12#ifndef joedb_db_encoded_file_Client_declared
13#define joedb_db_encoded_file_Client_declared
34 db(file, recovery,
false)
42 protected detail::Client_Data,
48 int64_t schema_checkpoint;
54 if (schema_checkpoint)
56 if (db.schema_journal.get_checkpoint() > schema_checkpoint)
58 db.check_single_row();
70 detail::Client_Data(file, recovery),
82 schema_checkpoint = db.schema_journal.get_checkpoint();
Lock object that allows writing to a database managed by a joedb::Client.
Readonly_Journal & journal
int64_t get_checkpoint_difference() const
static Connection dummy
Since this class has no internal state, this global variable can be used instead of creating an insta...
Writable specialization of Client.
For more flexibility than the transaction lambda.
Writable_Database & get_database()
Client_Lock(Client &client)
Handle concurrent access to a joedb::Abstract_File using a joedb::Connection.
void read_journal() override
const Database & get_database() const
Client(joedb::Abstract_File &file, joedb::Connection &connection=joedb::Connection::dummy, joedb::Content_Check content_check=joedb::Content_Check::fast, joedb::Recovery recovery=joedb::Recovery::none)
auto transaction(F transaction)
Execute a write transaction.
Store all the tables of the database.
static void throw_exception(const std::string &message)
A Database that contains a joedb::Writable_Journal and keeps them in sync.
#define JOEDB_DEBUG_ASSERT(x)
assertion tested in debug mode
@ none
default: fail if file size > checkpoint
Automatically generated by joedbc.