7#include <dballe/db/v7/trace.h>
8#include <dballe/db/v7/fwd.h>
24 std::shared_ptr<dballe::sql::Connection>
conn;
34 void init_after_connect();
37 DB(std::shared_ptr<dballe::sql::Connection>
conn);
40 db::Format
format()
const {
return Format::V7; }
45 std::shared_ptr<dballe::Transaction>
transaction(
bool readonly=
false)
override;
46 std::shared_ptr<dballe::db::Transaction>
test_transaction(
bool readonly=
false)
override;
61 void reset(
const char* repinfo_file = 0);
DB-ALLe database connection for database format V7.
Definition: db/v7/db.h:21
v7::Driver & driver()
Access the backend DB driver.
std::shared_ptr< dballe::Transaction > transaction(bool readonly=false) override
Begin a transaction on this database, and return a Transaction object that can be used to commit it.
db::Format format() const
Return the format of this DB.
Definition: db/v7/db.h:40
std::shared_ptr< dballe::db::Transaction > test_transaction(bool readonly=false) override
Same as transaction(), but the resulting transaction will throw an exception if commit is called.
void reset(const char *repinfo_file=0)
Reset the database, removing all existing DBALLE tables and re-creating them empty.
Trace * trace
Database query tracing.
Definition: db/v7/db.h:26
bool explain_queries
True if we print an EXPLAIN trace of all queries to stderr.
Definition: db/v7/db.h:28
v7::Driver * m_driver
SQL driver backend.
Definition: db/v7/db.h:32
void disappear()
Remove all our traces from the database, if applicable.
void delete_tables()
Delete all the DB-ALLe tables from the database.
std::shared_ptr< dballe::sql::Connection > conn
Database connection.
Definition: db/v7/db.h:24
void vacuum()
Remove orphan values from the database.
Functions used to connect to DB-All.e and insert, query and delete data.
Forward declarations for public dballe/sql names.
Definition: db/v7/trace.h:195
Definition: transaction.h:16