Flox Package Database 1
CRUD Operations on Nix Package Metadata
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
flox::pkgdb::GetCommand Class Reference

Minimal set of DB queries, largely focused on looking up info that is non-trivial to query with a "plain" SQLite statement. More...

#include <command.hh>

Inheritance diagram for flox::pkgdb::GetCommand:
flox::pkgdb::PkgDbMixin< PkgDbReadOnly > flox::command::AttrPathMixin flox::pkgdb::DbPathMixin flox::command::InlineInputMixin flox::NixState flox::NixStoreMixin

Public Member Functions

command::VerboseParsergetParser ()
 
int run ()
 Execute the get routine.
 
- Public Member Functions inherited from flox::pkgdb::PkgDbMixin< PkgDbReadOnly >
void openPkgDb ()
 Open a flox::pkgdb::PkgDb connection using the command state's dbPath or flake value.
 
void openPkgDb ()
 
void openPkgDb ()
 
argparse::Argument & addTargetArg (argparse::ArgumentParser &parser)
 Add target argument to any parser to read either a flake-ref or path to an existing database.
 
- Public Member Functions inherited from flox::pkgdb::DbPathMixin
argparse::Argument & addDatabasePathOption (argparse::ArgumentParser &parser)
 
- Public Member Functions inherited from flox::command::InlineInputMixin
argparse::Argument & addSubtreeArg (argparse::ArgumentParser &parser)
 
argparse::Argument & addFlakeRefArg (argparse::ArgumentParser &parser)
 
const RegistryInputgetRegistryInput ()
 Return the parsed RegistryInput.
 
- Public Member Functions inherited from flox::NixState
 NixState ()=default
 Construct NixState using the systems default nix store.
 
 NixState (nix::ref< nix::Store > &store)
 Construct NixState from an existing store connection.
 
nix::ref< nix::EvalState > getState ()
 Lazily open a nix evaluator.
 
- Public Member Functions inherited from flox::NixStoreMixin
 NixStoreMixin (const NixStoreMixin &)=default
 
 NixStoreMixin (NixStoreMixin &&)=default
 
NixStoreMixinoperator= (const NixStoreMixin &)=default
 
NixStoreMixinoperator= (NixStoreMixin &&)=default
 
 NixStoreMixin (const nix::ref< nix::Store > &store)
 Construct NixStoreMixin from an existing store connection.
 
 NixStoreMixin ()
 Construct NixStoreMixin using the systems default nix store.
 
nix::ref< nix::Store > getStore ()
 Lazily open a nix store connection.
 
- Public Member Functions inherited from flox::command::AttrPathMixin
argparse::Argument & addAttrPathArgs (argparse::ArgumentParser &parser)
 Sets the attribute path to be scraped.
 
void fixupAttrPath ()
 Sets fallback attrPath to a package set.
 

Private Member Functions

int runId ()
 Execute the get id routine.
 
int runDone ()
 Execute the get done routine.
 
int runPath ()
 Execute the get path routine.
 
int runFlake ()
 Execute the get flake routine.
 
int runDb ()
 Execute the get db routine.
 
int runPkg ()
 Execute the get pkg routine.
 

Private Attributes

command::VerboseParser parser
 
command::VerboseParser pId
 
command::VerboseParser pPath
 
command::VerboseParser pDone
 
command::VerboseParser pFlake
 
command::VerboseParser pDb
 
command::VerboseParser pPkg
 
bool isPkg = false
 
row_id id = 0
 

Additional Inherited Members

- Public Attributes inherited from flox::pkgdb::PkgDbMixin< PkgDbReadOnly >
std::shared_ptr< FloxFlakeflake
 
std::shared_ptr< T > db
 
- Public Attributes inherited from flox::pkgdb::DbPathMixin
std::optional< std::filesystem::path > dbPath
 
- Public Attributes inherited from flox::command::AttrPathMixin
flox::AttrPath attrPath
 
- Protected Member Functions inherited from flox::command::InlineInputMixin
void parseFlakeRef (const std::string &flakeRef)
 Fill registryInput by parsing a flake ref.
 

Detailed Description

Minimal set of DB queries, largely focused on looking up info that is non-trivial to query with a "plain" SQLite statement.

This subcommand has additional subcommands:

Member Function Documentation

◆ run()

int flox::pkgdb::GetCommand::run ( )

Execute the get routine.

Returns
EXIT_SUCCESS or EXIT_FAILURE.

◆ runDb()

int flox::pkgdb::GetCommand::runDb ( )
private

Execute the get db routine.

Returns
EXIT_SUCCESS or EXIT_FAILURE.

◆ runDone()

int flox::pkgdb::GetCommand::runDone ( )
private

Execute the get done routine.

Returns
EXIT_SUCCESS or EXIT_FAILURE.

◆ runFlake()

int flox::pkgdb::GetCommand::runFlake ( )
private

Execute the get flake routine.

Returns
EXIT_SUCCESS or EXIT_FAILURE.

◆ runId()

int flox::pkgdb::GetCommand::runId ( )
private

Execute the get id routine.

Returns
EXIT_SUCCESS or EXIT_FAILURE.

◆ runPath()

int flox::pkgdb::GetCommand::runPath ( )
private

Execute the get path routine.

Returns
EXIT_SUCCESS or EXIT_FAILURE.

◆ runPkg()

int flox::pkgdb::GetCommand::runPkg ( )
private

Execute the get pkg routine.

Returns
EXIT_SUCCESS or EXIT_FAILURE.

Member Data Documentation

◆ parser

command::VerboseParser flox::pkgdb::GetCommand::parser
private

get parser

◆ pDb

command::VerboseParser flox::pkgdb::GetCommand::pDb
private

get db parser

◆ pDone

command::VerboseParser flox::pkgdb::GetCommand::pDone
private

get done parser

◆ pFlake

command::VerboseParser flox::pkgdb::GetCommand::pFlake
private

get flake parser

◆ pId

command::VerboseParser flox::pkgdb::GetCommand::pId
private

get id parser

◆ pPath

command::VerboseParser flox::pkgdb::GetCommand::pPath
private

get path parser

◆ pPkg

command::VerboseParser flox::pkgdb::GetCommand::pPkg
private

get pkg parser


The documentation for this class was generated from the following files: