Joedb 9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
File_Database.h
Go to the documentation of this file.
1/////////////////////////////////////////////////////////////////////////////
2//
3// This code was automatically generated by the joedb compiler
4// https://www.joedb.org/
5//
6// Path to compiler: /home/rcoulom/repos/joedb/doc/source/tutorial/build/joedbc
7// Version: 9.1.4
8// joedbc compilation time: Apr 19 2025 18:13:35
9// Generation of this file: 2025-04-19 16:13:37 GMT
10//
11/////////////////////////////////////////////////////////////////////////////
12#ifndef settings_File_Database_declared
13#define settings_File_Database_declared
14
15#include "Writable_Database.h"
16#include "joedb/journal/File.h"
17
18namespace settings
19{
20 namespace detail
21 {
22 class File_Database_Data
23 {
24 protected:
25 joedb::File file;
26
27 File_Database_Data(const char *file_name, joedb::Open_Mode mode):
28 file(file_name, mode)
29 {
30 }
31 };
32 }
33
34 /// Shortcut to directly build a @ref Writable_Database from a file name
36 protected detail::File_Database_Data,
38 {
39 public:
41 (
42 const char *file_name,
46 ):
47 File_Database_Data(file_name, mode),
48 Writable_Database(file, check, commit_level)
49 {
50 }
51
53 (
54 const std::string &file_name,
58 ):
59 File_Database(file_name.c_str(), mode, check, commit_level)
60 {
61 }
62 };
63}
64
65#endif
Shortcut to directly build a Writable_Database from a file name.
File_Database(const char *file_name, joedb::Open_Mode mode=joedb::Open_Mode::write_existing_or_create_new, joedb::Readonly_Journal::Check check=joedb::Readonly_Journal::Check::all, joedb::Commit_Level commit_level=joedb::Commit_Level::no_commit)
File_Database(const std::string &file_name, joedb::Open_Mode mode=joedb::Open_Mode::write_existing_or_create_new, joedb::Readonly_Journal::Check check=joedb::Readonly_Journal::Check::all, joedb::Commit_Level commit_level=joedb::Commit_Level::no_commit)
A writable Database constructed from a writable joedb::Buffered_File.
Open_Mode
Definition Open_Mode.h:8
@ write_existing_or_create_new
either write_existing or create_new depending on whether the file exists. Racy in Posix,...
JOEDB_FILE File
Definition File.h:25
Commit_Level
Definition Writable.h:13
Automatically generated by joedbc.
Definition Client.h:19