Flox Package Database 1
CRUD Operations on Nix Package Metadata
|
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>
Public Member Functions | |
command::VerboseParser & | getParser () |
int | run () |
Execute the get routine. | |
![]() | |
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. | |
![]() | |
argparse::Argument & | addDatabasePathOption (argparse::ArgumentParser &parser) |
![]() | |
argparse::Argument & | addSubtreeArg (argparse::ArgumentParser &parser) |
argparse::Argument & | addFlakeRefArg (argparse::ArgumentParser &parser) |
const RegistryInput & | getRegistryInput () |
Return the parsed RegistryInput. | |
![]() | |
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. | |
![]() | |
NixStoreMixin (const NixStoreMixin &)=default | |
NixStoreMixin (NixStoreMixin &&)=default | |
NixStoreMixin & | operator= (const NixStoreMixin &)=default |
NixStoreMixin & | operator= (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. | |
![]() | |
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 | |
![]() | |
std::shared_ptr< FloxFlake > | flake |
std::shared_ptr< T > | db |
![]() | |
std::optional< std::filesystem::path > | dbPath |
![]() | |
flox::AttrPath | attrPath |
![]() | |
void | parseFlakeRef (const std::string &flakeRef) |
Fill registryInput by parsing a flake ref. | |
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:
pkgdb get id [--pkg] DB-PATH ATTR-PATH...
(AttrSet|Packages).id
for ATTR-PATH
.pkgdb get done DB-PATH ATTR-PATH...
AttrPath
has been scraped.pkgdb get path [--pkg] DB-PATH ID
AttrPath
for (AttrSet|Packages).id
.pkgdb get flake DB-PATH
LockedFlake
table including fingerprint, locked-ref, etc.pkgdb get db FLAKE-REF
int flox::pkgdb::GetCommand::run | ( | ) |
Execute the get
routine.
EXIT_SUCCESS
or EXIT_FAILURE
.
|
private |
Execute the get db
routine.
EXIT_SUCCESS
or EXIT_FAILURE
.
|
private |
Execute the get done
routine.
EXIT_SUCCESS
or EXIT_FAILURE
.
|
private |
Execute the get flake
routine.
EXIT_SUCCESS
or EXIT_FAILURE
.
|
private |
Execute the get id
routine.
EXIT_SUCCESS
or EXIT_FAILURE
.
|
private |
Execute the get path
routine.
EXIT_SUCCESS
or EXIT_FAILURE
.
|
private |
Execute the get pkg
routine.
EXIT_SUCCESS
or EXIT_FAILURE
.
|
private |
get
parser
|
private |
get db
parser
|
private |
get done
parser
|
private |
get flake
parser
|
private |
get id
parser
|
private |
get path
parser
|
private |
get pkg
parser