Joedb 9.1.4
The Journal-Only Embedded Database
|
Store all the tables of the database. More...
#include <joedb/db/encoded_file/Database.h>
Public Member Functions | |
void | set_max_record_id (size_t record_id) |
bool | is_valid (id_of_buffer id) const |
Database () | |
int64_t | get_schema_checkpoint () const |
void | initialize_with_readonly_journal (joedb::Readonly_Journal &journal) |
container_of_buffer | get_buffer_table () const |
id_of_buffer | next (id_of_buffer id) const |
id_of_buffer | previous (id_of_buffer id) const |
template<class Comparator > | |
std::vector< id_of_buffer > | sorted_buffer (Comparator comparator) const |
joedb::Blob | get_data (id_of_buffer record) const |
int64_t | get_size (id_of_buffer record) const |
int64_t | get_offset (id_of_buffer record) const |
![]() | |
Writable (Commit_Level default_commit_level=Commit_Level::no_commit) | |
virtual void | drop_table (Table_Id table_id) |
virtual void | rename_table (Table_Id table_id, const std::string &name) |
virtual void | add_field (Table_Id table_id, const std::string &name, Type type) |
virtual void | drop_field (Table_Id table_id, Field_Id field_id) |
virtual void | rename_field (Table_Id table_id, Field_Id field_id, const std::string &name) |
virtual void | flush () |
virtual void | checkpoint (Commit_Level commit_level) |
Commit_Level | get_default_commit_level () const |
void | default_checkpoint () |
virtual void | insert_into (Table_Id table_id, Record_Id record_id) |
virtual void | insert_vector (Table_Id table_id, Record_Id record_id, size_t size) |
virtual void | delete_from (Table_Id table_id, Record_Id record_id) |
virtual void | on_blob (Blob blob) |
virtual bool | wants_blob_data () const |
virtual Blob | write_blob_data (const std::string &data) |
virtual | ~Writable ()=default |
Static Public Member Functions | |
template<typename E = joedb::Exception> | |
static void | throw_exception (const std::string &message) |
static id_of_buffer | null_buffer () |
Public Attributes | |
size_t | max_record_id |
Table_Id | current_table_id = Table_Id{0} |
Protected Member Functions | |
bool | is_valid_record_id_for_buffer (Record_Id record_id) const |
void | internal_delete_buffer (Record_Id record_id) |
void | internal_insert_buffer (Record_Id record_id) |
void | internal_vector_insert_buffer (Record_Id record_id, size_t size) |
void | internal_update_buffer__data (Record_Id record_id, joedb::Blob field_value_of_data) |
void | internal_update_vector_buffer__data (Record_Id record_id, size_t size, const joedb::Blob *value) |
void | internal_update_buffer__size (Record_Id record_id, int64_t field_value_of_size) |
void | internal_update_vector_buffer__size (Record_Id record_id, size_t size, const int64_t *value) |
void | internal_update_buffer__offset (Record_Id record_id, int64_t field_value_of_offset) |
void | internal_update_vector_buffer__offset (Record_Id record_id, size_t size, const int64_t *value) |
void | delete_from (Table_Id table_id, Record_Id record_id) final |
void | insert_into (Table_Id table_id, Record_Id record_id) final |
void | insert_vector (Table_Id table_id, Record_Id record_id, size_t size) final |
void | update_int64 (Table_Id table_id, Record_Id record_id, Field_Id field_id, int64_t value) final |
void | update_blob (Table_Id table_id, Record_Id record_id, Field_Id field_id, joedb::Blob value) final |
void | update_vector_int64 (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const int64_t *value) final |
void | update_vector_blob (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const joedb::Blob *value) final |
int64_t * | get_own_int64_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) final |
joedb::Blob * | get_own_blob_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) final |
void | comment (const std::string &comment) override |
void | timestamp (int64_t timestamp) override |
void | valid_data () final |
bool | requires_schema_upgrade () const |
void | check_schema () |
void | create_table (const std::string &name) override |
void | drop_table (Table_Id table_id) final |
void | rename_table (Table_Id table_id, const std::string &name) final |
void | add_field (Table_Id table_id, const std::string &name, joedb::Type type) override |
void | drop_field (Table_Id table_id, Field_Id field_id) final |
void | rename_field (Table_Id table_id, Field_Id field_id, const std::string &name) final |
void | custom (const std::string &name) override |
Protected Attributes | |
detail::data_of_buffer | storage_of_buffer |
bool | upgrading_schema = false |
joedb::Memory_File | schema_file |
joedb::Writable_Journal | schema_journal |
Friends | |
class | Readable |
class | id_of_buffer |
class | container_of_buffer |
Definition at line 74 of file Database.h.
|
inline |
Definition at line 467 of file Database.h.
|
inlineoverrideprotected |
Definition at line 432 of file Database.h.
|
inlineprotected |
Definition at line 388 of file Database.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from joedb::Writable.
Definition at line 375 of file Database.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from joedb::Writable.
Definition at line 409 of file Database.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from joedb::Writable.
Definition at line 460 of file Database.h.
|
inlinefinalprotected |
Definition at line 193 of file Database.h.
|
inlinefinalprotected |
Definition at line 443 of file Database.h.
|
inlinefinalprotected |
Definition at line 416 of file Database.h.
|
inline |
Definition at line 577 of file Database.h.
|
inline |
Definition at line 515 of file Database.h.
|
inline |
Definition at line 527 of file Database.h.
|
inlinefinalprotected |
Definition at line 354 of file Database.h.
|
inlinefinalprotected |
Definition at line 329 of file Database.h.
|
inline |
Definition at line 472 of file Database.h.
|
inline |
Definition at line 521 of file Database.h.
|
inline |
Definition at line 477 of file Database.h.
|
inlinefinalprotected |
Definition at line 199 of file Database.h.
|
inlinefinalprotected |
Definition at line 214 of file Database.h.
|
inlineprotected |
Definition at line 101 of file Database.h.
|
inlineprotected |
Definition at line 110 of file Database.h.
|
inlineprotected |
Definition at line 120 of file Database.h.
|
inlineprotected |
Definition at line 168 of file Database.h.
|
inlineprotected |
Definition at line 144 of file Database.h.
|
inlineprotected |
Definition at line 130 of file Database.h.
|
inlineprotected |
Definition at line 178 of file Database.h.
|
inlineprotected |
Definition at line 154 of file Database.h.
|
inlineprotected |
Definition at line 115 of file Database.h.
|
inline |
Definition at line 95 of file Database.h.
|
inlineprotected |
Definition at line 99 of file Database.h.
|
inline |
Definition at line 491 of file Database.h.
|
inlinestatic |
Definition at line 510 of file Database.h.
|
inline |
Definition at line 499 of file Database.h.
|
inlinefinalprotected |
Definition at line 449 of file Database.h.
|
inlinefinalprotected |
Definition at line 422 of file Database.h.
|
inlineprotected |
Definition at line 383 of file Database.h.
|
inline |
Definition at line 90 of file Database.h.
std::vector< id_of_buffer > joedb::db::encoded_file::Database::sorted_buffer | ( | Comparator | comparator | ) | const |
Definition at line 583 of file Database.h.
|
inlinestatic |
Definition at line 82 of file Database.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from joedb::Writable.
Definition at line 376 of file Database.h.
|
inlinefinalprotected |
Definition at line 262 of file Database.h.
|
inlinefinalprotected |
Definition at line 237 of file Database.h.
|
inlinefinalprotected |
Definition at line 308 of file Database.h.
|
inlinefinalprotected |
Definition at line 282 of file Database.h.
|
inlinefinalprotectedvirtual |
Reimplemented from joedb::Writable.
Definition at line 377 of file Database.h.
|
friend |
Definition at line 78 of file Database.h.
|
friend |
Definition at line 77 of file Database.h.
|
friend |
Definition at line 76 of file Database.h.
Table_Id joedb::db::encoded_file::Database::current_table_id = Table_Id{0} |
Definition at line 88 of file Database.h.
size_t joedb::db::encoded_file::Database::max_record_id |
Definition at line 87 of file Database.h.
|
protected |
Definition at line 380 of file Database.h.
|
protected |
Definition at line 381 of file Database.h.
|
protected |
Definition at line 98 of file Database.h.
|
protected |
Definition at line 379 of file Database.h.