12#ifndef tutorial_rpc_city_Writable_Database_declared
13#define tutorial_rpc_city_Writable_Database_declared
33 friend class detail::Client_Data;
44 void check_single_row();
47 void create_table(
const std::string &name)
override;
53 bool perform_initialization
69 return journal.get_file().read_blob(blob);
74 return journal.write_blob(data);
79 return journal.ahead_of_checkpoint();
84 journal.soft_checkpoint();
89 journal.hard_checkpoint();
96 void flush()
override {journal.flush();}
119 std::string field_value_of_name
122 auto result = new_city();
123 set_name(result, std::move(field_value_of_name));
void insert_into(Table_Id table_id, Record_Id record_id) override
Strongly-typed wrapper around an integer representing a row of the city table.
constexpr Record_Id get_record_id() const
Handle concurrent access to a joedb::Abstract_File using a joedb::Connection.
void timestamp(int64_t timestamp) override
void comment(const std::string &comment) override
void internal_insert_city(Record_Id record_id)
static constexpr id_of_city the_city()
const std::string & get_name(id_of_city record=id_of_city{0}) const
detail::data_of_city storage_of_city
void internal_update_city__name(Record_Id record_id, std::string field_value_of_name)
Shortcut to directly build a Writable_Database with a Memory_File.
Write simultaneously to the database and the file (ignore schema changes).
std::string read_blob(joedb::Blob blob) const
void set_name(id_of_city record, std::string field_value_of_name)
int64_t ahead_of_checkpoint() const
friend class Memory_Database
void set_name(std::string field_value_of_name)
void hard_checkpoint() override
void soft_checkpoint() override
joedb::Blob write_blob(std::string_view data) override
const joedb::Readonly_Journal & get_journal() const
void write_comment(const std::string &comment)
Automatically generated by joedbc.
tutorial::id_of_city id_of_city