12#ifndef tutorial_Readable_declared
13#define tutorial_Readable_declared
44 if (table_id == Table_Id{1})
46 if (table_id == Table_Id{2})
59 if (table_id == Table_Id{1})
61 if (field_id == Field_Id(1))
63 return db.
storage_of_city.field_value_of_name[to_underlying(record_id)];
67 if (table_id == Table_Id{2})
69 if (field_id == Field_Id(1))
73 if (field_id == Field_Id(2))
109 if (table_id == Table_Id{2})
111 if (field_id == Field_Id(3))
183 constexpr static Table_Id
id{1};
187 constexpr static Field_Id
id{1};
190 namespace person_table
192 constexpr static Table_Id
id{2};
194 namespace first_name_field
196 constexpr static Field_Id
id{1};
198 namespace last_name_field
200 constexpr static Field_Id
id{2};
204 constexpr static Field_Id
id{3};
void replay_log(Writable &writable)
Store all the tables of the database.
detail::data_of_city storage_of_city
detail::data_of_person storage_of_person
Implement the joedb::Readable interface for a compiled database.
const joedb::Blob & get_blob(Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
const joedb::Freedom_Keeper & get_freedom(Table_Id table_id) const override
const joedb::Record_Id & get_reference(Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
const int64_t & get_int64(Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
const double & get_float64(Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
const int8_t & get_int8(Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
Readable(const Database &db)
const float & get_float32(Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
const char & get_boolean(Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
const int32_t & get_int32(Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
const int16_t & get_int16(Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
const std::string & get_string(Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
Automatically generated by joedbc.