|
| | PkgDbInput (nix::ref< nix::Store > &store, const RegistryInput &input, std::filesystem::path dbPath, const db_path_tag &, const std::string &name="") |
| | Construct a PkgDbInput from a RegistryInput and a path to the database.
|
| |
| | PkgDbInput (nix::ref< nix::Store > &store, const RegistryInput &input, const std::filesystem::path &cacheDir=getPkgDbCachedir(), const std::string &name="") |
| | Construct a PkgDbInput from a RegistryInput and a path to the directory where the database should be cached.
|
| |
| nix::ref< PkgDbReadOnly > | getDbReadOnly () const |
| |
|
nix::ref< PkgDb > | getDbReadWrite () |
| | Open a read/write database connection if one is not open, and return a handle.
|
| |
|
void | closeDbReadWrite () |
| | Close the read/write database connection if it is open.
|
| |
| std::filesystem::path | getDbPath () const |
| |
| void | scrapePrefix (const flox::AttrPath &prefix) |
| | Ensure that an attribute path prefix has been scraped.
|
| |
| void | scrapeSystems (const std::vector< System > &systems) |
| | Scrape all prefixes indicated by InputPreferences for systems.
|
| |
|
void | setName (std::string_view name) |
| | Add/set a shortname for this input.
|
| |
| std::string | getNameOrURL () |
| | Get an identifier for this input.
|
| |
|
nlohmann::json | getRowJSON (row_id row) |
| | Get a JSON representation of a row in the database.
|
| |
|
| FloxFlakeInput (const nix::ref< nix::Store > &store, const RegistryInput &input) |
| | Construct a flox::FloxFlakeInput from a nix store connection and flox::RegistryInput.
|
| |
|
nix::ref< FloxFlake > | getFlake () |
| | Get a handle for a flake with a nix evaluator.
|
| |
| const std::vector< Subtree > & | getSubtrees () |
| | Get a list of enabled subtrees.
|
| |
|
RegistryInput | getLockedInput () |
| |
|
| RegistryInput (const std::optional< std::vector< Subtree > > &subtrees, const nix::FlakeRef &from) |
| |
|
| RegistryInput (const nix::FlakeRef &from) |
| |
|
nix::ref< nix::FlakeRef > | getFlakeRef () const |
| | Get the flake reference associated with this input.
|
| |
|
bool | operator== (const RegistryInput &other) const |
| |
|
bool | operator!= (const RegistryInput &other) const |
| |
|
| InputPreferences (const InputPreferences &)=default |
| |
|
| InputPreferences (InputPreferences &&)=default |
| |
|
InputPreferences & | operator= (const InputPreferences &)=default |
| |
|
InputPreferences & | operator= (InputPreferences &&)=default |
| |
|
| InputPreferences (const std::optional< std::vector< Subtree > > &subtrees) |
| |
|
virtual void | clear () |
| | Reset to default state.
|
| |
| pkgdb::PkgQueryArgs & | fillPkgQueryArgs (pkgdb::PkgQueryArgs &pqa) const |
| | Fill a flox::pkgdb::PkgQueryArgs struct with preferences to lookup packages filtered by InputPreferences requirements.
|
| |
| void | merge (const InputPreferences &overrides) |
| | Merges this flox::InputPreferences with another InputPreferences, overriding values in this InputPreferences with those from the other InputPreferences.
|
| |
|
bool | operator== (const InputPreferences &other) const |
| |
|
bool | operator!= (const InputPreferences &other) const |
| |
A RegistryInput that opens a PkgDb associated with a flake.
| void flox::pkgdb::PkgDbInput::init |
( |
| ) |
|
|
private |
Prepare database handles for use.
Upon exiting a compatible read-only database connection will be open with the LockedFlake and DbVersions tables created.
If the database does not exist it will be created.
If the database VIEWs schemas are out of date they will be updated.
If the database TABLEs schemas are out of date the database will be deleted and recreated.
| void flox::pkgdb::PkgDbInput::scrapePrefix |
( |
const flox::AttrPath & |
prefix | ) |
|
Ensure that an attribute path prefix has been scraped.
If the prefix has been scraped no writes are performed, but if the prefix has not been scraped a read/write connection will be used.
If a read/write connection is already open when scrapePrefix is called it will remain open, but if the connection is opened by scrapePrefix it will be closed after scraping is completed.
- Parameters
-
| prefix | Attribute path to scrape. |