12 Generator(
".",
"Readonly_Client.h", options)
24#include "joedb/concurrency/Client.h"
25#include "joedb/journal/File.h"
34 class Readonly_Client_Data
37 joedb::Connection connection;
38 joedb::Readonly_Journal journal;
41 Readonly_Client_Data(joedb::File &file): journal(file)
43 db.initialize_with_readonly_journal(journal);
49 class Readonly_Client:
50 private detail::Readonly_Client_Data,
54 const int64_t schema_checkpoint;
57 virtual void read_journal() override
59 journal.play_until_checkpoint(db);
60 if (db.get_schema_checkpoint() > schema_checkpoint)
61 Database::throw_exception("Pulled a schema change");
65 Readonly_Client(joedb::File &file):
66 detail::Readonly_Client_Data(file),
70 Readonly_Client_Data::connection,
73 schema_checkpoint(db.get_schema_checkpoint())
77 const Database &get_database() const {return db;}
const std::vector< std::string > & get_name_space() const
const Compiler_Options & options
Readonly_Client_h(const Compiler_Options &options)
void namespace_open(std::ostream &out, const std::vector< std::string > &n)
void namespace_close(std::ostream &out, const std::vector< std::string > &n)
void namespace_include_guard(std::ostream &out, const char *name, const std::vector< std::string > &n)
One code generator for each of the file generated by joedbc.