Joedb 10.0.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
client_lock.cpp
Go to the documentation of this file.
3
4static int client_lock(joedb::Arguments &arguments)
5{
6 tutorial::File_Client client("tutorial.joedb");
7
8 {
9 tutorial::Client_Lock lock(client);
10
11 lock.get_database().write_comment("Hello");
12 lock.checkpoint_and_push();
13 lock.get_database().write_comment("Goodbye");
14 lock.get_database().write_timestamp();
15 lock.checkpoint_and_push_unlock();
16 }
17
18 return 0;
19}
20
21int main(int argc, char **argv)
22{
23 return joedb::main_wrapper(client_lock, argc, argv);
24}
Class for conveniently parsing command-line arguments.
Definition Arguments.h:19
For more flexibility than the transaction lambda.
Definition Client.h:119
Shortcut to directly build a Client from a file name.
Definition File_Client.h:39
int main()
int main_wrapper(int(*main)(Arguments &), int argc, char **argv)
Process command-line arguments and catch exceptions from main.