ark::database::SqliteDatabaseConnection

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


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

Methods

  • SqliteDatabaseConnection(std::string url)
    Constructor. Initializes against the given PostgreSQL URL.

  • ~SqliteDatabaseConnection()
    Destructor.

  • void begin_transaction()
    Begins a new transaction on this connection. When this is done, all queries are batched into a single transaction. When not done, each execute_query() gets its own transaction.

  • void end_transaction()
    Ends a transaction on this connection. Commits all outstanding queries.

  • void rollback_transaction()
    Rollback a transaction on this connection. All completed work is aborted.

  • AbstractDatabaseResultPtr execute_query(const std::string & query, std::span< std::string > params)
    Implementation of the virtual execute method the query is executed, and it is assumed that the parameters are in the given span, ordered appropriately.