Joedb 9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
joedb_convert.cpp
Go to the documentation of this file.
3
4namespace joedb
5{
6 /////////////////////////////////////////////////////////////////////////////
7 static void process
8 /////////////////////////////////////////////////////////////////////////////
9 (
10 Readonly_Journal &input,
11 Writable_Journal &output,
12 int64_t checkpoint
13 )
14 {
15 if (checkpoint <= 0)
16 checkpoint = input.get_checkpoint_position();
17 input.play_until(output, checkpoint);
18 output.default_checkpoint();
19 }
20
21 /////////////////////////////////////////////////////////////////////////////
22 static int main(int argc, char **argv)
23 /////////////////////////////////////////////////////////////////////////////
24 {
25 return process_journal_pair(argc, argv, process);
26 }
27}
28
29//////////////////////////////////////////////////////////////////////////////
30int main(int argc, char **argv)
31//////////////////////////////////////////////////////////////////////////////
32{
33 return joedb::main_exception_catcher(joedb::main, argc, argv);
34}
int main()
int main_exception_catcher(int(*main)(int, char **), int argc, char **argv)
Catch exception from main.
int process_journal_pair(int argc, char **argv, void(*process)(Readonly_Journal &, Writable_Journal &, int64_t checkpoint))
Definition Blob.h:7