12#ifndef tutorial_Database_Writable_declared
13#define tutorial_Database_Writable_declared
29 extern const char * schema_string;
30 inline constexpr size_t schema_string_size = 99;
103 to_underlying(record_id) < 0 ||
128 std::string_view value
183 const std::string *value
247 return (
storage_of_city.field_value_of_name.data() + to_underlying(record_id));
256 return (
storage_of_person.field_value_of_first_name.data() + to_underlying(record_id));
260 return (
storage_of_person.field_value_of_last_name.data() + to_underlying(record_id));
298 return schema_file.get_data().size() < detail::schema_string_size;
304 const size_t schema_file_size =
schema_file.get_data().size();
308 schema_file_size < pos ||
309 schema_file_size > detail::schema_string_size ||
312 detail::schema_string + pos,
314 schema_file_size - pos
338 const std::string &name
348 const std::string &name,
366 const std::string &name
373 void custom(
const std::string &name)
override
bool is_used_vector(Record_Id index, size_t size) const
void replay_log(Writable &writable)
int64_t get_checkpoint() const
Superclass with all joedb journal event listeners as virtual functions.
virtual void delete_vector(Table_Id table_id, Record_Id record_id, size_t size)=0
joedb::index_t max_record_id
joedb::Record_Id * get_own_reference_storage(Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) override
std::string * get_own_string_storage(Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) override
void update_vector_reference(Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const joedb::Record_Id *value) override
void set_max_record_id(joedb::index_t record_id)
void initialize_with_readonly_journal(joedb::Readonly_Journal &journal)
void valid_data() override
void rename_table(Table_Id table_id, const std::string &name) override
void custom(const std::string &name) override
void delete_vector(Table_Id table_id, Record_Id record_id, size_t size) override
void drop_field(Table_Id table_id, Field_Id field_id) override
void timestamp(int64_t timestamp) override
Table_Id current_table_id
void drop_table(Table_Id table_id) override
void insert_into(Table_Id table_id, Record_Id record_id) override
void comment(const std::string &comment) override
joedb::Memory_File schema_file
void update_reference(Table_Id table_id, Record_Id record_id, Field_Id field_id, joedb::Record_Id value) override
int64_t get_schema_checkpoint() const
void insert_vector(Table_Id table_id, Record_Id record_id, size_t size) override
void add_field(Table_Id table_id, const std::string &name, joedb::Type type) override
void rename_field(Table_Id table_id, Field_Id field_id, const std::string &name) override
void update_vector_string(Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const std::string *value) override
joedb::Writable_Journal schema_journal
void create_table(const std::string &name) override
bool requires_schema_upgrade() const
void update_string(Table_Id table_id, Record_Id record_id, Field_Id field_id, std::string_view value) override
void delete_from(Table_Id table_id, Record_Id record_id) override
Store all the tables of the database.
void internal_update_vector_person__first_name(Record_Id record_id, size_t size, const std::string *value)
void internal_update_vector_city__name(Record_Id record_id, size_t size, const std::string *value)
void internal_insert_person(Record_Id record_id)
static void throw_exception(std::string_view message)
void internal_update_vector_person__home(Record_Id record_id, size_t size, const id_of_city *value)
detail::data_of_city storage_of_city
detail::data_of_person storage_of_person
void internal_update_vector_person__last_name(Record_Id record_id, size_t size, const std::string *value)
void internal_update_person__first_name(Record_Id record_id, std::string field_value_of_first_name)
void internal_update_person__last_name(Record_Id record_id, std::string field_value_of_last_name)
void internal_update_person__home(Record_Id record_id, id_of_city field_value_of_home)
bool is_valid_record_id_for_city(Record_Id record_id) const
bool is_valid_record_id_for_person(Record_Id record_id) const
void internal_insert_city(Record_Id record_id)
void internal_delete_person(Record_Id record_id)
void internal_delete_city(Record_Id record_id)
void internal_vector_insert_city(Record_Id record_id, size_t size)
void internal_vector_insert_person(Record_Id record_id, size_t size)
void internal_update_city__name(Record_Id record_id, std::string field_value_of_name)
returned by Database::get_city_table
returned by Database::get_person_table
Strongly-typed wrapper around an integer representing a row of the city table.
#define JOEDB_RELEASE_ASSERT(x)
always-tested assertion (release and debug mode)
Automatically generated by joedbc.