Joedb 9.1.3
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tutorial::Readable Class Reference

Implement the joedb::Readable interface for a compiled database. More...

#include <tutorial/Readable.h>

Inheritance diagram for tutorial::Readable:
Inheritance graph
[legend]
Collaboration diagram for tutorial::Readable:
Collaboration graph
[legend]

Public Member Functions

 Readable (const Database &db)
 
const joedb::Compact_Freedom_Keeperget_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 joedb::Record_Idget_reference (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::Blobget_blob (Table_Id table_id, Record_Id record_id, Field_Id field_id) const override
 
- 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 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
 

Additional Inherited Members

- Protected Member Functions inherited from joedb::Database_Schema
const Tableget_table (Table_Id table_id) const
 
Tableget_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, Tabletables
 
std::map< Table_Id, std::string > table_names
 
Table_Id current_table_id = Table_Id(0)
 

Detailed Description

This allows using a compiled database with tools such as the command interpreter.

Definition at line 26 of file Readable.h.

Constructor & Destructor Documentation

◆ Readable()

tutorial::Readable::Readable ( const Database db)
inline

Definition at line 32 of file Readable.h.

Member Function Documentation

◆ get_blob()

const joedb::Blob & tutorial::Readable::get_blob ( Table_Id  table_id,
Record_Id  record_id,
Field_Id  field_id 
) const
inlineoverride

Definition at line 170 of file Readable.h.

◆ get_boolean()

const char & tutorial::Readable::get_boolean ( Table_Id  table_id,
Record_Id  record_id,
Field_Id  field_id 
) const
inlineoverride

Definition at line 120 of file Readable.h.

◆ get_float32()

const float & tutorial::Readable::get_float32 ( Table_Id  table_id,
Record_Id  record_id,
Field_Id  field_id 
) const
inlineoverride

Definition at line 130 of file Readable.h.

◆ get_float64()

const double & tutorial::Readable::get_float64 ( Table_Id  table_id,
Record_Id  record_id,
Field_Id  field_id 
) const
inlineoverride

Definition at line 140 of file Readable.h.

◆ get_freedom()

const joedb::Compact_Freedom_Keeper & tutorial::Readable::get_freedom ( Table_Id  table_id) const
inlineoverride

Definition at line 39 of file Readable.h.

◆ get_int16()

const int16_t & tutorial::Readable::get_int16 ( Table_Id  table_id,
Record_Id  record_id,
Field_Id  field_id 
) const
inlineoverride

Definition at line 160 of file Readable.h.

◆ get_int32()

const int32_t & tutorial::Readable::get_int32 ( Table_Id  table_id,
Record_Id  record_id,
Field_Id  field_id 
) const
inlineoverride

Definition at line 82 of file Readable.h.

◆ get_int64()

const int64_t & tutorial::Readable::get_int64 ( Table_Id  table_id,
Record_Id  record_id,
Field_Id  field_id 
) const
inlineoverride

Definition at line 92 of file Readable.h.

◆ get_int8()

const int8_t & tutorial::Readable::get_int8 ( Table_Id  table_id,
Record_Id  record_id,
Field_Id  field_id 
) const
inlineoverride

Definition at line 150 of file Readable.h.

◆ get_reference()

const joedb::Record_Id & tutorial::Readable::get_reference ( Table_Id  table_id,
Record_Id  record_id,
Field_Id  field_id 
) const
inlineoverride

Definition at line 102 of file Readable.h.

◆ get_string()

const std::string & tutorial::Readable::get_string ( Table_Id  table_id,
Record_Id  record_id,
Field_Id  field_id 
) const
inlineoverride

Definition at line 52 of file Readable.h.


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