Joedb 10.4.6
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
joedb Namespace Reference

Namespaces

namespace  asio
namespace  generator
 One code generator for each of the file generated by joedbc.
namespace  db
namespace  rpc
namespace  ssh
 C++ wrappers for libssh.

Classes

class  Blob
class  Compiler_Options
class  Custom_Collector
class  Channel
class  Client
 Handle concurrent access to a file with a joedb::Connection. More...
class  Content_Mismatch
class  Connection
class  Connector
 Used by Robust_Connection to reconnect after an error. More...
class  Pullonly_Journal_Connection
class  Journal_Connection
class  File_Connection
class  Ping_Client
class  Keep_Alive_Thread
class  Local_Channel
class  Local_Connector
class  Readonly_Client
 Specialized client for read-only files. More...
class  Readonly_Database_Client
class  Robust_Connection
 Server_Connection that automatically reconnects on error More...
class  Server
class  Server_Client
class  Server_Connection
class  Server_File
 Directly read file served from joedb_server. More...
class  Websocket_Channel
 Channel to communicate with a (secure) Websocket. More...
class  Websocket_Connector
class  Writable_Client
 Writable specialization of Client. More...
class  Client_Lock
 Lock object that allows writing to a database managed by a joedb::Client. More...
class  Writable_Database_Client
class  Writable_Database_Client_Lock
class  Writable_Journal_Client
class  Writable_Journal_Client_Lock
class  Android_Logger
class  Apple_Logger
class  Assertion_Failure
 Indicates a bug in the code, thrown by JOEDB_DEBUG_ASSERT when NDEBUG not defined. More...
class  CLog_Logger
class  Destructor_Logger
class  Disconnection
 joedb::Robust_Connection does not try to reconnect when thrown More...
class  Exception
class  File_Logger
class  Logger
class  Multi_Logger
class  Out_Of_Date
 sent when the schema of a read-only compiled database is out of date More...
class  Posix_Logger
class  Stream_Logger
class  String_Logger
class  Freedom_Keeper_Constants
class  List_Data
class  List_Freedom_Keeper
class  Dense_Freedom_Keeper
class  Freedom_Keeper
class  Record_Id
struct  underlying_type
struct  underlying_type< Record_Id >
class  Database
class  Database_Schema
class  Field
class  Table
class  Abstract_File
class  Async_Reader
class  Async_Writer
class  Brotli_Codec
class  Brotli_Decoder
class  Brotli_File
class  Buffer
class  Codec
class  CURL_Easy
class  CURL_File
class  Decoder
class  Encoded_File
class  File_Buffer
class  File_Hasher
class  Journal_Hasher
class  File_Iterator
class  File_Slice
class  filebuf
 https://en.cppreference.com/w/cpp/io/basic_streambuf.html More...
class  fstream
class  ifstream
class  ofstream
struct  Header
class  Identity_Codec
class  Abstract_Interpreted_File
 This class allows accessing a file in joedbi text format. More...
class  Interpreted_File
class  iostream
class  null_iostream
class  Journal_Construction_Lock
class  Memory_File
class  Portable_File
class  Posix_FD
class  Posix_File
class  Readonly_Brotli_File
class  Readonly_Encoded_File
class  Head_Shared_Lock
class  Readonly_Journal
class  Readonly_Memory_File
class  SFTP_File
class  SHA_256
 Compute SHA 256 hash code: https://en.wikipedia.org/wiki/SHA-2. More...
class  Stream_File
class  Upgradable_File
class  Windows_Handle
class  Windows_File
class  Head_Exclusive_Lock
class  Writable_Journal
class  Tail_Exclusive_Lock
class  Multiplexer
class  Readable
class  Selective_Writable
class  Signal
class  Span
class  Lock
class  Thread_Safe
class  Type
class  Arguments
 Class for conveniently parsing command-line arguments. More...
class  Blob_Reader_Command_Processor
class  Client_Command_Processor
class  Writable_Client_Command_Processor
class  Command_Interpreter
class  Command_Processor
class  Connection_Builder
class  Connection_Parser
 Create an instance of a Connection by parsing command-line arguments. More...
class  Data_Manipulation_Command_Processor
class  Dummy_Connection_Builder
class  File_Connection_Builder
class  File_Parser
 Create an instance of a Abstract_File by parsing command-line arguments. More...
class  Readable_Interpreter
class  Writable_Interpreter
class  Interpreter
class  Interpreter_Writable
class  Interpreter_Dump_Writable_Parent
class  Interpreter_Dump_Writable
class  Server_Data
class  Local_Connection_Builder
class  Readonly_Writable_Client
class  Parsed_Client
class  Parsed_Logger
class  Progress_Bar
class  Raw_Dump_Writable
class  Readable_Command_Processor
class  Readable_Writable_Command_Processor
class  Server_Connection_Builder
class  SQL_Writable
class  SQL_Dump_Writable_Parent
class  SQL_Dump_Writable
class  SSH_Connection_Builder
class  Websocket_Connection_Builder
class  Writable_Command_Processor
class  Writable
 Superclass with all joedb journal event listeners as virtual functions. More...
class  Dummy_Writable
 Writable with empty insert_vector and delete_vector. More...
class  Loop_Writable
 Writable with looping insert_vector and delete_vector. More...

Typedefs

using Release_Assertion_Failure = Exception
 Indicates a bug in the code, thrown by JOEDB_RELEASE_ASSERT.
using System_Logger = CLog_Logger
using index_t = ptrdiff_t
using Default_Buffer = std::array<char, 1 << 12>
using File = JOEDB_FILE
using Type_Id_Storage = uint8_t

Enumerations

enum class  Content_Check { Content_Check::none , Content_Check::fast , Content_Check::full }
enum class  Data_Transfer { Data_Transfer::without_data = 0 , Data_Transfer::with_data = 1 }
enum class  Lock_Action { Lock_Action::no_locking = 0 , Lock_Action::lock_before = 1 }
enum class  Unlock_Action { Unlock_Action::keep_locked = 0 , Unlock_Action::unlock_after = 1 }
enum class  Table_Id : uint16_t
enum class  Field_Id : uint16_t
enum class  Recovery { Recovery::none = 0 , Recovery::ignore_header = 1 , Recovery::overwrite = 2 }
enum class  Open_Mode {
  Open_Mode::read_existing , Open_Mode::write_existing , Open_Mode::create_new , Open_Mode::write_existing_or_create_new ,
  Open_Mode::shared_write , Open_Mode::write_lock , Open_Mode::mode_count
}
enum  JSON_Error { ok = 0 , utf8 = 1 , infnan = 2 }

Functions

void parse_compiler_options (std::istream &in, Compiler_Options &compiler_options)
std::vector< std::string > split_namespace (std::string_view s)
void namespace_write (std::ostream &out, const std::vector< std::string > &n, const char *delimiter)
std::string namespace_string (const std::vector< std::string > &n, const char *delimiter)
void namespace_open (std::ostream &out, const std::vector< std::string > &n)
void namespace_close (std::ostream &out, const std::vector< std::string > &n)
void namespace_include_guard_open (std::ostream &out, const char *name, const std::vector< std::string > &n)
void namespace_include_guard_close (std::ostream &out)
void write_source_code (const std::string &dir_name, const std::string &file_name, const std::function< void(std::ostream &)> &write)
std::string get_error_message (const char *condition, const char *full_file, const char *function, int line)
constexpr const char * get_version ()
size_t hash_combine (size_t h1, size_t h2)
constexpr index_t to_underlying (Record_Id id)
constexpr underlying_type< Table_Id >::type to_underlying (Table_Id id)
constexpr underlying_type< Field_Id >::type to_underlying (Field_Id id)
Table_Id & operator++ (Table_Id &id)
Field_Id & operator++ (Field_Id &id)
constexpr bool is_letter (char c)
constexpr bool is_number (char c)
bool is_identifier (const std::string_view s)
constexpr uint32_t rotr (uint32_t x, uint8_t n)
 Rotate x n bits to the right.
int64_t neg (int64_t x)
std::string base64_encode (const std::string_view input)
std::string base64_decode (std::string_view input)
void dump_header (std::ostream &out, Abstract_File &file)
void about_joedb (std::ostream &out)
void dump (const Readable &db, Writable &writable, bool schema_only)
void dump_data (const Readable &db, Writable &writable)
void pack (Readonly_Journal &input_journal, Writable &writable)
std::string get_time_string (int64_t timestamp)
std::string get_time_string_of_now ()
void inplace_pack (const std::string &file_name)
bool interruptible_sleep (std::chrono::milliseconds duration)
int write_json (std::ostream &out, const Readable &db, bool base64)
int write_json_string (std::ostream &out, const std::string_view s, bool base64)
int main_wrapper (int(*main)(Arguments &), int argc, char **argv)
 Process command-line arguments and catch exceptions from main.
char get_hex_char_from_digit (uint8_t n)
void write_octal_character (std::ostream &out, uint8_t c)
void write_string (std::ostream &out, std::string_view s, bool json)
void write_int8 (std::ostream &out, int8_t value)
int process_journal_pair (Arguments &arguments, void(*process)(Readonly_Journal &, Writable_Journal &, int64_t checkpoint))
std::string read_string (std::istream &in)
uint8_t get_hex_digit_from_char (char c)
void write_hexa_character (std::ostream &out, uint8_t c)
void write_sql_string (std::ostream &out, const std::string_view s)
size_t utf8_display_size (const std::string_view s)
uint32_t read_utf8_char (size_t &i, const std::string_view s)
void write_justified (std::ostream &out, const std::string_view s, size_t width, bool flush_left)
int8_t read_int8 (std::istream &in)
bool read_boolean (std::istream &in)
void write_boolean (std::ostream &out, bool value)
void write_blob (std::ostream &out, Blob blob)
Blob read_blob (std::istream &in)
std::ostream & operator<< (std::ostream &out, Table_Id table_id)
std::ostream & operator<< (std::ostream &out, Field_Id field_id)
std::ostream & operator<< (std::ostream &out, Record_Id record_id)
template<typename T>
std::istream & read_underlying (std::istream &in, T &value)
std::istream & operator>> (std::istream &in, Table_Id &table_id)
std::istream & operator>> (std::istream &in, Field_Id &field_id)
std::istream & operator>> (std::istream &in, Record_Id &record_id)
int32_t read_int32 (std::istream &in)
void write_int32 (std::ostream &out, int32_t value)
int64_t read_int64 (std::istream &in)
void write_int64 (std::ostream &out, int64_t value)
Record_Id read_reference (std::istream &in)
void write_reference (std::ostream &out, Record_Id value)
float read_float32 (std::istream &in)
void write_float32 (std::ostream &out, float value)
double read_float64 (std::istream &in)
void write_float64 (std::ostream &out, double value)
int16_t read_int16 (std::istream &in)
void write_int16 (std::ostream &out, int16_t value)
void write_value (std::ostream &out, const Readable &readable, Table_Id table_id, Record_Id record_id, Field_Id field_id)

Variables

constexpr int protocol_version = 19
const std::array< const char *, size_t(Open_Mode::mode_count)> open_mode_strings

Typedef Documentation

◆ Default_Buffer

using joedb::Default_Buffer = std::array<char, 1 << 12>

Definition at line 9 of file Abstract_File.cpp.

◆ File

using joedb::File = JOEDB_FILE

Definition at line 23 of file File.h.

◆ System_Logger

Definition at line 21 of file System_Logger.h.

◆ Type_Id_Storage

using joedb::Type_Id_Storage = uint8_t

Definition at line 11 of file Type.h.

Function Documentation

◆ get_error_message()

std::string joedb::get_error_message ( const char * condition,
const char * full_file,
const char * function,
int line )

Definition at line 9 of file assert.cpp.

◆ hash_combine()

size_t joedb::hash_combine ( size_t h1,
size_t h2 )
inline

Definition at line 8 of file hash_combine.h.

◆ is_letter()

bool joedb::is_letter ( char c)
constexpr

Definition at line 5 of file is_identifier.cpp.

◆ is_number()

bool joedb::is_number ( char c)
constexpr

Definition at line 10 of file is_identifier.cpp.

◆ neg()

int64_t joedb::neg ( int64_t x)
inline

Definition at line 8 of file neg.h.

◆ operator++() [1/2]

Field_Id & joedb::operator++ ( Field_Id & id)
inline

Definition at line 81 of file index_types.h.

◆ operator++() [2/2]

Table_Id & joedb::operator++ ( Table_Id & id)
inline

Definition at line 77 of file index_types.h.

◆ rotr()

uint32_t joedb::rotr ( uint32_t x,
uint8_t n )
constexpr

Definition at line 11 of file SHA_256.h.

◆ to_underlying() [1/3]

underlying_type< Field_Id >::type joedb::to_underlying ( Field_Id id)
constexpr

Definition at line 69 of file index_types.h.

◆ to_underlying() [2/3]

index_t joedb::to_underlying ( Record_Id id)
constexpr

Definition at line 59 of file index_types.h.

◆ to_underlying() [3/3]

underlying_type< Table_Id >::type joedb::to_underlying ( Table_Id id)
constexpr

Definition at line 61 of file index_types.h.

◆ write_source_code()

void joedb::write_source_code ( const std::string & dir_name,
const std::string & file_name,
const std::function< void(std::ostream &)> & write )

Definition at line 8 of file write_source_code.cpp.