Joedb 9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
joedb::Database_Schema Class Reference

#include <joedb/interpreted/Database_Schema.h>

Inheritance diagram for joedb::Database_Schema:
Inheritance graph
[legend]
Collaboration diagram for joedb::Database_Schema:
Collaboration graph
[legend]

Public Member Functions

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 Typeget_field_type (Table_Id table_id, Field_Id field_id) const override
 
const Compact_Freedom_Keeperget_freedom (Table_Id table_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_last_record_id (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::Writable
 Writable (Commit_Level default_commit_level=Commit_Level::no_commit)
 
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 ()
 
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
 

Protected Member Functions

const Tableget_table (Table_Id table_id) const
 
Tableget_table (Table_Id table_id)
 

Static Protected Member Functions

static void check_identifier (const char *message, const std::string &name)
 

Protected Attributes

std::map< Table_Id, Tabletables
 
std::map< Table_Id, std::string > table_names
 
Table_Id current_table_id = Table_Id(0)
 

Detailed Description

Definition at line 13 of file Database_Schema.h.

Constructor & Destructor Documentation

◆ ~Database_Schema()

joedb::Database_Schema::~Database_Schema ( )
overridevirtualdefault

Member Function Documentation

◆ add_field()

void joedb::Database_Schema::add_field ( Table_Id  table_id,
const std::string &  name,
Type  type 
)
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 146 of file Database_Schema.cpp.

◆ check_identifier()

void joedb::Database_Schema::check_identifier ( const char *  message,
const std::string &  name 
)
staticprotected

Definition at line 8 of file Database_Schema.cpp.

◆ create_table()

void joedb::Database_Schema::create_table ( const std::string &  name)
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 103 of file Database_Schema.cpp.

◆ drop_field()

void joedb::Database_Schema::drop_field ( Table_Id  table_id,
Field_Id  field_id 
)
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 160 of file Database_Schema.cpp.

◆ drop_table()

void joedb::Database_Schema::drop_table ( Table_Id  table_id)
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 117 of file Database_Schema.cpp.

◆ get_field_type()

const Type & joedb::Database_Schema::get_field_type ( Table_Id  table_id,
Field_Id  field_id 
) const
overridevirtual

Implements joedb::Readable.

Definition at line 62 of file Database_Schema.cpp.

◆ get_fields()

const std::map< Field_Id, std::string > & joedb::Database_Schema::get_fields ( Table_Id  table_id) const
overridevirtual

Implements joedb::Readable.

Definition at line 52 of file Database_Schema.cpp.

◆ get_freedom()

const Compact_Freedom_Keeper & joedb::Database_Schema::get_freedom ( Table_Id  table_id) const
overridevirtual

Implements joedb::Readable.

Definition at line 81 of file Database_Schema.cpp.

◆ get_table() [1/2]

Table & joedb::Database_Schema::get_table ( Table_Id  table_id)
protected

Definition at line 32 of file Database_Schema.cpp.

◆ get_table() [2/2]

const Table & joedb::Database_Schema::get_table ( Table_Id  table_id) const
protected

Definition at line 22 of file Database_Schema.cpp.

◆ get_tables()

const std::map< Table_Id, std::string > & joedb::Database_Schema::get_tables ( ) const
inlineoverridevirtual

Implements joedb::Readable.

Definition at line 33 of file Database_Schema.h.

◆ rename_field()

void joedb::Database_Schema::rename_field ( Table_Id  table_id,
Field_Id  field_id,
const std::string &  name 
)
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 167 of file Database_Schema.cpp.

◆ rename_table()

void joedb::Database_Schema::rename_table ( Table_Id  table_id,
const std::string &  name 
)
overridevirtual

Reimplemented from joedb::Writable.

Definition at line 128 of file Database_Schema.cpp.

Member Data Documentation

◆ current_table_id

Table_Id joedb::Database_Schema::current_table_id = Table_Id(0)
protected

Definition at line 18 of file Database_Schema.h.

◆ table_names

std::map<Table_Id, std::string> joedb::Database_Schema::table_names
protected

Definition at line 17 of file Database_Schema.h.

◆ tables

std::map<Table_Id, Table> joedb::Database_Schema::tables
protected

Definition at line 16 of file Database_Schema.h.


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