Joedb 9.1.3
The Journal-Only Embedded Database
|
#include <joedb/journal/Writable_Journal.h>
Public Member Functions | |
Writable_Journal (Journal_Construction_Lock &lock, Check check, Commit_Level commit_level) | |
Writable_Journal (Journal_Construction_Lock &&lock, Check check, Commit_Level commit_level) | |
Writable_Journal (Buffered_File &file, Check check=Check::all, Commit_Level commit_level=Commit_Level::no_commit) | |
void | append () |
int64_t | pull_from (Readonly_Journal &journal, int64_t until_checkpoint=std::numeric_limits< int64_t >::max()) |
int64_t | ahead_of_checkpoint () const noexcept |
void | flush () final |
void | checkpoint (Commit_Level commit_level) final |
void | create_table (const std::string &name) final |
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, Type type) final |
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) final |
void | comment (const std::string &comment) final |
void | timestamp (int64_t timestamp) final |
void | valid_data () 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 | delete_from (Table_Id table_id, Record_Id record_id) final |
bool | wants_blob_data () const final |
Blob | write_blob_data (const std::string &data) final |
Async_Writer | get_async_tail_writer () |
Writable_Journal * | get_writable_journal () override |
void | lock_pull () |
bool | is_locked () const |
void | unlock () noexcept |
~Writable_Journal () override | |
![]() | |
Readonly_Journal (Journal_Construction_Lock &lock, Check check) | |
Readonly_Journal (Journal_Construction_Lock &&lock, Check check) | |
Readonly_Journal (Buffered_File &file, Check check=Check::readonly) | |
uint32_t | get_file_version () const |
bool | at_end_of_file () const |
int64_t | get_position () const |
int64_t | get_checkpoint_position () const |
bool | is_empty () const |
bool | is_shared () const |
void | pull () |
const Buffered_File & | get_file () const |
void | replay_log (Writable &writable) |
void | replay_with_checkpoint_comments (Writable &writable) |
void | rewind () |
void | set_position (int64_t position) |
void | one_step (Writable &writable) |
void | play_until (Writable &writable, int64_t end) |
void | play_until_checkpoint (Writable &writable) |
void | seek_to_checkpoint () |
Async_Reader | get_async_tail_reader (int64_t start_position) const |
Async_Reader | get_async_reader (int64_t start_position, int64_t until_position) const |
Async_Reader | get_async_blob_reader (Blob blob) const |
virtual | ~Readonly_Journal ()=default |
![]() | |
Writable (Commit_Level default_commit_level=Commit_Level::no_commit) | |
Commit_Level | get_default_commit_level () const |
void | default_checkpoint () |
virtual void | on_blob (Blob blob) |
virtual | ~Writable ()=default |
![]() | |
void | set_catcher (Posthumous_Catcher &new_catcher) noexcept |
Additional Inherited Members | |
![]() | |
enum class | Check { joedb = 1 , version = 2 , big_size = 4 , small_size = 8 , set_checkpoint = 16 , checkpoint_mismatch = 32 , all = joedb | version | big_size | small_size | checkpoint_mismatch , readonly = joedb | version | small_size , overwrite = all & ~big_size & ~checkpoint_mismatch , none = set_checkpoint } |
![]() | |
static bool | check_flag (Check check, Check flag) |
static constexpr bool | is_second_checkpoint_copy (int64_t offset) |
![]() | |
static constexpr uint32_t | version_number = 0x00000004 |
static constexpr uint32_t | compatible_version = 0x00000004 |
static constexpr int64_t | header_size = 41 |
static constexpr int64_t | checkpoint_offset = 5 + 4 |
![]() | |
enum class | operation_t : uint8_t { create_table = 0x01 , drop_table = 0x02 , add_field = 0x03 , drop_field = 0x04 , insert_into = 0x05 , delete_from = 0x06 , update = 0x07 , append = 0x08 , update_last = 0x09 , comment = 0x0a , timestamp = 0x0b , rename_table = 0x0c , rename_field = 0x0d , valid_data = 0x0e , insert_vector = 0x0f , custom = 0x10 , update_vector = 0x11 , update_next = 0x12 , blob = 0x13 , updates = 0x80 , TYPE_MACRO } |
![]() | |
Type | read_type () |
std::string | safe_read_string () |
![]() | |
void | postpone_exception (const char *message=nullptr) noexcept |
![]() | |
Buffered_File & | file |
uint32_t | file_version |
unsigned | checkpoint_index |
int64_t | checkpoint_position |
Table_Id | table_of_last_operation |
Record_Id | record_of_last_operation |
Field_Id | field_of_last_update |
Definition at line 13 of file Writable_Journal.h.
|
explicit |
Definition at line 6 of file Writable_Journal.cpp.
|
explicit |
Definition at line 64 of file Writable_Journal.cpp.
|
explicit |
Definition at line 76 of file Writable_Journal.cpp.
|
override |
Definition at line 467 of file Writable_Journal.cpp.
|
finalvirtual |
Reimplemented from joedb::Writable.
Definition at line 207 of file Writable_Journal.cpp.
|
noexcept |
Definition at line 123 of file Writable_Journal.cpp.
|
inline |
Definition at line 58 of file Writable_Journal.h.
|
finalvirtual |
Reimplemented from joedb::Writable.
Definition at line 130 of file Writable_Journal.cpp.
|
finalvirtual |
Reimplemented from joedb::Writable.
Definition at line 260 of file Writable_Journal.cpp.
|
finalvirtual |
Reimplemented from joedb::Writable.
Definition at line 178 of file Writable_Journal.cpp.
|
finalvirtual |
Reimplemented from joedb::Writable.
Definition at line 252 of file Writable_Journal.cpp.
Reimplemented from joedb::Writable.
Definition at line 325 of file Writable_Journal.cpp.
Reimplemented from joedb::Writable.
Definition at line 224 of file Writable_Journal.cpp.
|
finalvirtual |
Reimplemented from joedb::Writable.
Definition at line 186 of file Writable_Journal.cpp.
|
inlinefinalvirtual |
Reimplemented from joedb::Writable.
Definition at line 71 of file Writable_Journal.h.
|
inline |
Definition at line 139 of file Writable_Journal.h.
|
inlineoverridevirtual |
Reimplemented from joedb::Readonly_Journal.
Definition at line 144 of file Writable_Journal.h.
Reimplemented from joedb::Writable.
Definition at line 283 of file Writable_Journal.cpp.
|
finalvirtual |
Reimplemented from joedb::Writable.
Definition at line 307 of file Writable_Journal.cpp.
|
inline |
Definition at line 147 of file Writable_Journal.h.
void joedb::Writable_Journal::lock_pull | ( | ) |
Definition at line 448 of file Writable_Journal.cpp.
int64_t joedb::Writable_Journal::pull_from | ( | Readonly_Journal & | journal, |
int64_t | until_checkpoint = std::numeric_limits<int64_t>::max() |
||
) |
Definition at line 88 of file Writable_Journal.cpp.
|
finalvirtual |
Reimplemented from joedb::Writable.
Definition at line 237 of file Writable_Journal.cpp.
|
finalvirtual |
Reimplemented from joedb::Writable.
Definition at line 194 of file Writable_Journal.cpp.
|
finalvirtual |
Reimplemented from joedb::Writable.
Definition at line 268 of file Writable_Journal.cpp.
|
noexcept |
Definition at line 459 of file Writable_Journal.cpp.
|
finalvirtual |
Reimplemented from joedb::Writable.
Definition at line 276 of file Writable_Journal.cpp.
|
inlinefinalvirtual |
Reimplemented from joedb::Writable.
Definition at line 136 of file Writable_Journal.h.
|
finalvirtual |
Reimplemented from joedb::Writable.
Definition at line 433 of file Writable_Journal.cpp.