Flox Package Database 1
CRUD Operations on Nix Package Metadata
|
Interfaces for reading a SQLite3 package set database. More...
#include <filesystem>
#include <functional>
#include <queue>
#include <string>
#include <vector>
#include <nix/eval-cache.hh>
#include <nix/flake/flake.hh>
#include <nlohmann/json.hpp>
#include <sqlite3pp.hh>
#include "flox/core/command.hh"
#include "flox/core/exceptions.hh"
#include "flox/core/types.hh"
#include "flox/package.hh"
#include "flox/pkgdb/pkg-query.hh"
Go to the source code of this file.
Classes | |
struct | flox::pkgdb::SqlVersions |
SQLite3 schema versions. More... | |
class | flox::pkgdb::PkgDbReadOnly |
A SQLite3 database used to cache derivation/package information about a single locked flake. More... | |
struct | flox::pkgdb::PkgDbReadOnly::LockedFlakeRef |
Locked flake reference for database's flake. More... | |
struct | flox::pkgdb::PkgDbReadOnly::NoSuchDatabase |
Thrown when a database is not found. More... | |
Namespaces | |
namespace | flox |
Interfaces for use by flox . | |
namespace | flox::pkgdb |
Interfaces for caching package metadata in SQLite3 databases. | |
Concepts | |
concept | flox::pkgdb::pkgdb_typename |
Restricts template parameters to classes that extend flox::pkgdb::PkgDbReadOnly. | |
Macros | |
#define | FLOX_PKGDB_VERSION "NO.VERSION" |
Typedefs | |
using | flox::pkgdb::Fingerprint = nix::flake::Fingerprint |
using | flox::pkgdb::SQLiteDb = sqlite3pp::database |
using | flox::pkgdb::sql_rc = int |
Functions | |
std::ostream & | flox::pkgdb::operator<< (std::ostream &oss, const SqlVersions &versions) |
Emit version information to an output stream. | |
std::filesystem::path | flox::pkgdb::getPkgDbCachedir () |
Get the default pkgdb cache directory to save databases. | |
std::filesystem::path | flox::pkgdb::genPkgDbName (const Fingerprint &fingerprint, const std::filesystem::path &cacheDir=getPkgDbCachedir()) |
Get an absolute path to the ‘PkgDb’ for a given fingerprint hash. | |
bool | flox::pkgdb::isSQLError (int rcode) |
Predicate to detect failing SQLite3 return codes. | |
Variables | |
constexpr SqlVersions | flox::pkgdb::sqlVersions = { .tables = 2, .views = 3 } |
Interfaces for reading a SQLite3 package set database.