Joedb 10.0.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Readonly_Client.h
Go to the documentation of this file.
1/////////////////////////////////////////////////////////////////////////////
2//
3// This code was automatically generated by the joedb compiler
4// https://www.joedb.org/
5//
6// Path to compiler: /home/rcoulom/repos/joedb/compcmake/gcc_debug/joedbc
7// Version: 10.0.1
8// joedbc compilation time: Jun 13 2025 15:26:57
9// Generation of this file: 2025-06-13 13:27:16 GMT
10//
11/////////////////////////////////////////////////////////////////////////////
12#ifndef settings_Readonly_Client_declared
13#define settings_Readonly_Client_declared
14
15#include "Database_Writable.h"
17
18namespace settings
19{
20 /// Client for a read-only file (allows pulling, unlike @ref Readonly_Database)
22 {
23 private:
25 int64_t schema_checkpoint;
26
27 protected:
28 virtual void read_journal() override
29 {
30 Readonly_Journal::play_until_checkpoint(db);
31 if (db.get_schema_checkpoint() > schema_checkpoint)
32 Database::throw_exception("Pulled a schema change");
33 }
34
35 public:
38 (
39 file,
40 *static_cast<joedb::Connection *>(this),
41 joedb::Content_Check::none
42 )
43 {
45 schema_checkpoint = db.get_schema_checkpoint();
46 }
47
49
50 const Database &get_database() const {return db;}
51 };
52}
53
54#endif
Specialized client for read-only files.
implement joedb::Writable in a Database
void initialize_with_readonly_journal(joedb::Readonly_Journal &journal)
Store all the tables of the database.
Definition Database.h:68
static void throw_exception(const std::string &message)
Definition Database.h:75
Client for a read-only file (allows pulling, unlike Readonly_Database)
Readonly_Client(joedb::Buffered_File &file)
const Database & get_database() const
virtual void read_journal() override
Definition Blob.h:7
Automatically generated by joedbc.
Definition Client.h:19