Joedb 9.5.0
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/compcmake/gcc_debug/joedbc
7// Version: 9.5.0
8// joedbc compilation time: May 5 2025 19:51:43
9// Generation of this file: 2025-05-05 17:51:47 GMT
10//
11/////////////////////////////////////////////////////////////////////////////
12#ifndef joedb_db_encoded_file_File_Database_declared
13#define joedb_db_encoded_file_File_Database_declared
14
15#include "Writable_Database.h"
16#include "joedb/journal/File.h"
17
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,
44 ):
45 File_Database_Data(file_name, mode),
47 {
48 }
49
51 (
52 const std::string &file_name,
54 ):
55 File_Database(file_name.c_str(), mode)
56 {
57 }
58 };
59}
60
61#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)
File_Database(const std::string &file_name, joedb::Open_Mode mode=joedb::Open_Mode::write_existing_or_create_new)
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,...
Automatically generated by joedbc.
Definition Client.h:19
JOEDB_FILE File
Definition File.h:25