ark::database

Typedefs

Defined in “ark/database/connection.hh”:

Defined in “ark/database/forward.hh”:

Classes

  • ark::database::AbstractDatabaseConnection
    This is an abstract database connection, while tries to abstract the underlying connection protocol and specifics from the user. This allows us to support different database backends.

  • ark::database::AbstractDatabaseResult
    This represents an abstract database result, which allows you to iterate over the values returned from a database query.

  • ark::database::DatabaseRow
    A database row for s result, meant to allow access into a particular row being returned from a database connection.

  • ark::database::PqxxDatabaseConnection
    An implementation of the abstract database connection which allows for executing queries against a PostgreSQL database.

  • ark::database::PqxxDatabaseResult
    An implementation of the abstract database result class for Postgres. This consumes a reference to a PQXX result, and releases it when it falls out of scope.

  • ark::database::SqliteDatabase
    A wrapper around sqlite3 to make it easier to use with C++. Opens a connection to the database and allows you to execute statements.

  • ark::database::SqliteDatabaseConnection
    An implementation of the abstract database connection which allows for executing queries against a Sqlite database.

  • ark::database::SqliteDatabaseResult
    An implementation of the abstract database result class for SQLite. This consumes a reference to a SQLite statement and will be responsible for freeing it.

  • ark::database::SqliteStatement
    A wrapper around a sqlite3 statement. Handles deallocation of the statement and makes it a bit easier to manage in C++.

Functions

Declared in “ark/database/sqlite_helpers.hh”:

  • std::string patch_query_for_sqlite(const std::string & query)
    SQLite queries take inputs that don’t quite match with Postgres, but have 1:1 translations. Use this routine to patch them.

  • void simple_sqlite_execute(sqlite3 * database, const std::string & statement)
    Simples wrapper around sqlite3_exec to make it a bit easier to use for testing purposes.

  • void simple_sqlite_execute(const std::filesystem::path & database_path, const std::string & statement)
    Simples wrapper around sqlite3_exec to make it a bit easier to use for testing purposes. Automatically opens/closes the database at the given path.