Joedb 10.5.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
joedb::Database Class Reference

#include <joedb/interpreted/Database.h>

Inheritance diagram for joedb::Database:
Collaboration diagram for joedb::Database:

Public Member Functions

 Database (Record_Id max_record_id=Record_Id::null)
Record_Id get_max_record_id () const
void insert_into (Table_Id table_id, Record_Id record_id) override
void insert_vector (Table_Id table_id, Record_Id record_id, size_t size) override
void delete_from (Table_Id table_id, Record_Id record_id) override
void delete_vector (Table_Id table_id, Record_Id record_id, size_t size) override
void update_string (Table_Id table_id, Record_Id record_id, Field_Id field_id, std::string_view value) 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
std::string * get_own_string_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) override
void update_int32 (Table_Id table_id, Record_Id record_id, Field_Id field_id, int32_t value) override
void update_vector_int32 (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const int32_t *value) override
int32_t * get_own_int32_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) override
void update_int64 (Table_Id table_id, Record_Id record_id, Field_Id field_id, int64_t value) override
void update_vector_int64 (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const int64_t *value) override
int64_t * get_own_int64_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) override
void update_boolean (Table_Id table_id, Record_Id record_id, Field_Id field_id, bool value) override
void update_vector_boolean (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const char *value) override
char * get_own_boolean_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) override
void update_float32 (Table_Id table_id, Record_Id record_id, Field_Id field_id, float value) override
void update_vector_float32 (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const float *value) override
float * get_own_float32_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) override
void update_float64 (Table_Id table_id, Record_Id record_id, Field_Id field_id, double value) override
void update_vector_float64 (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const double *value) override
double * get_own_float64_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) override
void update_int8 (Table_Id table_id, Record_Id record_id, Field_Id field_id, int8_t value) override
void update_vector_int8 (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const int8_t *value) override
int8_t * get_own_int8_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) override
void update_int16 (Table_Id table_id, Record_Id record_id, Field_Id field_id, int16_t value) override
void update_vector_int16 (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const int16_t *value) override
int16_t * get_own_int16_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) override
void update_blob (Table_Id table_id, Record_Id record_id, Field_Id field_id, joedb::Blob value) override
void update_vector_blob (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const joedb::Blob *value) override
joedb::Blob * get_own_blob_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) override
 ~Database ()
Public Member Functions inherited from joedb::Database_Schema
const std::map< Table_Id, std::string > & get_tables () const override
const std::map< Field_Id, std::string > & get_fields (Table_Id table_id) const override
const Type & get_field_type (Table_Id table_id, Field_Id field_id) const override
const Freedom_Keeper & get_freedom (Table_Id table_id) const override
const std::string & get_string (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 int64_t & get_int64 (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 float & get_float32 (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
const int16_t & get_int16 (Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
const joedb::Blob & get_blob (Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
void create_table (const std::string &name) override
void drop_table (Table_Id table_id) override
void rename_table (Table_Id table_id, const std::string &name) override
void add_field (Table_Id table_id, const std::string &name, Type type) override
void drop_field (Table_Id table_id, Field_Id field_id) override
void rename_field (Table_Id, Field_Id, const std::string &name) override
virtual ~Database_Schema () override
Public Member Functions inherited from joedb::Readable
Table_Id find_table (const std::string &name) const
Field_Id find_field (Table_Id table_id, const std::string &name) const
const std::string & get_table_name (Table_Id table_id) const
const std::string & get_field_name (Table_Id table_id, Field_Id field_id) const
Record_Id get_size (Table_Id table_id) const
bool is_used (Table_Id table_id, Record_Id record_id) const
virtual ~Readable ()
Public Member Functions inherited from joedb::Dummy_Writable
void insert_vector (Table_Id table_id, Record_Id record_id, size_t size) override
void delete_vector (Table_Id table_id, Record_Id record_id, size_t size) override
Public Member Functions inherited from joedb::Writable
virtual int64_t get_position () const
virtual void start_writing (int64_t position)
virtual void end_writing (int64_t position)
virtual void soft_checkpoint ()
virtual void hard_checkpoint ()
virtual void custom (const std::string &name)
virtual void comment (const std::string &comment)
virtual void timestamp (int64_t timestamp)
virtual void valid_data ()
virtual void flush ()
const std::string * get_own_string_const_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) const
const int32_t * get_own_int32_const_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) const
const int64_t * get_own_int64_const_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) const
virtual void update_vector_reference (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t size, const joedb::Record_Id *value)
virtual joedb::Record_Id * get_own_reference_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity)
const joedb::Record_Id * get_own_reference_const_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) const
const char * get_own_boolean_const_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) const
const float * get_own_float32_const_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) const
const double * get_own_float64_const_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) const
const int8_t * get_own_int8_const_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) const
const int16_t * get_own_int16_const_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) const
const joedb::Blob * get_own_blob_const_storage (Table_Id table_id, Record_Id record_id, Field_Id field_id, size_t &capacity) const
virtual void on_blob (Blob blob)
virtual bool wants_blob_data () const
virtual Blob write_blob (std::string_view data)
virtual ~Writable ()=default

Additional Inherited Members

Protected Member Functions inherited from joedb::Database_Schema
const Table & get_table (Table_Id table_id) const
Table & get_table (Table_Id table_id)
Static Protected Member Functions inherited from joedb::Database_Schema
static void check_identifier (const char *message, const std::string &name)
Protected Attributes inherited from joedb::Database_Schema
std::map< Table_Id, Table > tables
std::map< Table_Id, std::string > table_names
Table_Id current_table_id = Table_Id(0)

Detailed Description

Definition at line 9 of file Database.h.

Constructor & Destructor Documentation

◆ Database()

joedb::Database::Database ( Record_Id max_record_id = Record_Id::null)
inline

Definition at line 15 of file Database.h.

◆ ~Database()

joedb::Database::~Database ( )
default

Member Function Documentation

◆ delete_from()

void joedb::Database::delete_from ( Table_Id table_id,
Record_Id record_id )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 37 of file Database.cpp.

◆ delete_vector()

void joedb::Database::delete_vector ( Table_Id table_id,
Record_Id record_id,
size_t size )
overridevirtual

Implements joedb::Writable.

Definition at line 48 of file Database.cpp.

◆ get_max_record_id()

Record_Id joedb::Database::get_max_record_id ( ) const
inline

Definition at line 20 of file Database.h.

◆ get_own_blob_storage()

joedb::Blob * joedb::Database::get_own_blob_storage ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t & capacity )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 30 of file Database.cpp.

◆ get_own_boolean_storage()

char * joedb::Database::get_own_boolean_storage ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t & capacity )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 18 of file Database.cpp.

◆ get_own_float32_storage()

float * joedb::Database::get_own_float32_storage ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t & capacity )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 22 of file Database.cpp.

◆ get_own_float64_storage()

double * joedb::Database::get_own_float64_storage ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t & capacity )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 23 of file Database.cpp.

◆ get_own_int16_storage()

int16_t * joedb::Database::get_own_int16_storage ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t & capacity )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 27 of file Database.cpp.

◆ get_own_int32_storage()

int32_t * joedb::Database::get_own_int32_storage ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t & capacity )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 10 of file Database.cpp.

◆ get_own_int64_storage()

int64_t * joedb::Database::get_own_int64_storage ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t & capacity )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 11 of file Database.cpp.

◆ get_own_int8_storage()

int8_t * joedb::Database::get_own_int8_storage ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t & capacity )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 26 of file Database.cpp.

◆ get_own_string_storage()

std::string * joedb::Database::get_own_string_storage ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t & capacity )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 7 of file Database.cpp.

◆ insert_into()

void joedb::Database::insert_into ( Table_Id table_id,
Record_Id record_id )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 7 of file Database.cpp.

◆ insert_vector()

void joedb::Database::insert_vector ( Table_Id table_id,
Record_Id record_id,
size_t size )
overridevirtual

Implements joedb::Writable.

Definition at line 23 of file Database.cpp.

◆ update_blob()

void joedb::Database::update_blob ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
joedb::Blob value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 30 of file Database.cpp.

◆ update_boolean()

void joedb::Database::update_boolean ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
bool value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 18 of file Database.cpp.

◆ update_float32()

void joedb::Database::update_float32 ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
float value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 22 of file Database.cpp.

◆ update_float64()

void joedb::Database::update_float64 ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
double value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 23 of file Database.cpp.

◆ update_int16()

void joedb::Database::update_int16 ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
int16_t value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 27 of file Database.cpp.

◆ update_int32()

void joedb::Database::update_int32 ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
int32_t value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 10 of file Database.cpp.

◆ update_int64()

void joedb::Database::update_int64 ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
int64_t value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 11 of file Database.cpp.

◆ update_int8()

void joedb::Database::update_int8 ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
int8_t value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 26 of file Database.cpp.

◆ update_string()

void joedb::Database::update_string ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
std::string_view value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 7 of file Database.cpp.

◆ update_vector_blob()

void joedb::Database::update_vector_blob ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t size,
const joedb::Blob * value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 30 of file Database.cpp.

◆ update_vector_boolean()

void joedb::Database::update_vector_boolean ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t size,
const char * value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 18 of file Database.cpp.

◆ update_vector_float32()

void joedb::Database::update_vector_float32 ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t size,
const float * value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 22 of file Database.cpp.

◆ update_vector_float64()

void joedb::Database::update_vector_float64 ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t size,
const double * value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 23 of file Database.cpp.

◆ update_vector_int16()

void joedb::Database::update_vector_int16 ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t size,
const int16_t * value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 27 of file Database.cpp.

◆ update_vector_int32()

void joedb::Database::update_vector_int32 ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t size,
const int32_t * value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 10 of file Database.cpp.

◆ update_vector_int64()

void joedb::Database::update_vector_int64 ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t size,
const int64_t * value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 11 of file Database.cpp.

◆ update_vector_int8()

void joedb::Database::update_vector_int8 ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t size,
const int8_t * value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 26 of file Database.cpp.

◆ update_vector_string()

void joedb::Database::update_vector_string ( Table_Id table_id,
Record_Id record_id,
Field_Id field_id,
size_t size,
const std::string * value )
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 7 of file Database.cpp.


The documentation for this class was generated from the following files: