1#ifndef joedb_Readonly_Journal_declared
2#define joedb_Readonly_Journal_declared
13 class Writable_Journal;
22 void read_checkpoint(
const std::array<int64_t, 4> &pos);
23 void pull_without_locking();
25 #define TYPE_MACRO(cpp_type, return_type, type_id, read_method, W)\
26 void perform_update_##type_id(Writable &writable);
44 #define TYPE_MACRO(cpp_type, return_type, type_id, read_method, W)\
45 void read_vector_of_##type_id(cpp_type *data, size_t size);
71 #define TYPE_MACRO(t, rt, type_id, r, w)\
73 update_last_##type_id,\
74 update_next_##type_id,\
75 update_vector_##type_id,
virtual int64_t get_size() const
Get the size of the file, or -1 if it is unknown.
void set_position(int64_t position)
bool is_shared() const noexcept
virtual bool equal_to(Buffered_File &destination, int64_t from, int64_t until) const
int64_t get_position() const noexcept
void play_until(Writable &writable, int64_t end)
void one_step(Writable &writable)
static constexpr uint32_t format_version
std::string safe_read_string()
Record_Id record_of_last_operation
Readonly_Journal(Journal_Construction_Lock &&lock)
int64_t get_position() const
void replay_with_checkpoint_comments(Writable &writable)
void append_until(Writable &writable, int64_t end)
void replay_log(Writable &writable)
Async_Reader get_async_reader(int64_t start_position, int64_t until_position) const
Field_Id field_of_last_update
int64_t checkpoint_position
const Buffered_File & get_file() const
void play_until_checkpoint(Writable &writable)
int64_t get_checkpoint() const
bool equal_to(Readonly_Journal &journal, int64_t until) const
Async_Reader get_async_tail_reader(int64_t start_position) const
void skip_directly_to(int64_t position)
Table_Id table_of_last_operation
Readonly_Journal(Buffered_File &file)