ark::database::SqliteDatabase

Defined in header “ark/database/sqlite_helpers.hh”.


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

Methods

  • SqliteDatabase(const std::filesystem::path & database_path, const char * database_schema)
    Constructor. Opens the database at the given path. Initializes the database by executing the given schema.

  • ~SqliteDatabase()
    Destructor. Cleans up.

  • SqliteDatabase()
    Disallows copies.

  • SqliteDatabase()

  • SqliteDatabase & operator=()

  • SqliteDatabase & operator=()

  • void execute_statement(const std::string & statement)
    Executes a simple statement against the database. Not intended to be used for general purpose queries or inserts.

  • SqliteStatement prepare_statement(const char * query)
    Creates a new prepared statement from the given query.

  • sqlite3 * database()
    Returns a reference to the databasee.