12#ifndef tutorial_rpc_population_Client_declared
13#define tutorial_rpc_population_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.
Writable_Client(Writable_Journal &journal, Connection &connection=Connection::dummy, Content_Check content_check=Content_Check::fast)
For more flexibility than the transaction lambda.
Client_Lock(Client &client)
Writable_Database & get_database()
Handle concurrent access to a joedb::Abstract_File using a joedb::Connection.
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)
void read_journal() override
auto transaction(F transaction)
Execute a write transaction.
const Database & get_database() const
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.