12#ifndef tutorial_rpc_city_Writable_Database_declared
13#define tutorial_rpc_city_Writable_Database_declared
26 class Memory_Database;
31 friend class detail::Client_Data;
42 void check_single_row();
45 void create_table(
const std::string &name)
override;
51 bool perform_initialization
103 journal.
insert_into(Table_Id(1), result.get_record_id());
109 const std::string& field_value_of_name
112 auto result = new_city();
113 set_name(result, field_value_of_name);
121 journal.update_string(Table_Id(1), record.
get_record_id(), Field_Id(1), field_value_of_name);
124 void set_name(
const std::string& field_value_of_name)
std::string read_blob(Blob blob) const
const Abstract_File & get_file() const
void soft_checkpoint() override
int64_t ahead_of_checkpoint() const noexcept
void hard_checkpoint() override
void insert_into(Table_Id table_id, Record_Id record_id) override
Blob write_blob(const std::string &data) 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.
implement joedb::Writable in a Database
void timestamp(int64_t timestamp) override
void comment(const std::string &comment) override
void internal_insert_city(Record_Id record_id)
void internal_update_city__name(Record_Id record_id, const std::string &field_value_of_name)
static constexpr id_of_city the_city()
detail::data_of_city storage_of_city
Shortcut to directly build a Writable_Database with a Memory_File.
Write simultaneously to the database and the file (ignore schema changes)
A Database that contains a joedb::Writable_Journal and keeps them in sync.
std::string read_blob(joedb::Blob blob) const
int64_t ahead_of_checkpoint() const
void set_name(id_of_city record, const std::string &field_value_of_name)
joedb::Blob write_blob(const std::string &data) override
void hard_checkpoint() override
void set_name(const std::string &field_value_of_name)
void soft_checkpoint() override
const joedb::Readonly_Journal & get_journal() const
void write_comment(const std::string &comment)
Automatically generated by joedbc.