Joedb
10.0.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
src
joedb
concurrency
Readonly_Database_Client.h
Go to the documentation of this file.
1
#ifndef joedb_Readonly_Database_Client_declared
2
#define joedb_Readonly_Database_Client_declared
3
4
#include "
joedb/concurrency/Readonly_Client.h
"
5
#include "
joedb/interpreted/Database.h
"
6
7
namespace
joedb
8
{
9
/// @ingroup concurrency
10
class
Readonly_Database_Client
:
public
Readonly_Client
11
{
12
private
:
13
Database
database;
14
15
protected
:
16
void
read_journal
()
override
17
{
18
Readonly_Journal::play_until_checkpoint
(database);
19
}
20
21
public
:
22
Readonly_Database_Client
23
(
24
Buffered_File
&
file
,
25
Connection
&
connection
,
26
Content_Check
content_check =
Content_Check::fast
,
27
Recovery
recovery =
Recovery::none
28
):
29
Readonly_Client
(
file
,
connection
, content_check, recovery)
30
{
31
read_journal
();
32
}
33
34
const
Database
&
get_database
()
const
35
{
36
return
database;
37
}
38
};
39
}
40
41
#endif
joedb::Buffered_File
Definition
Buffered_File.h:18
joedb::Client::connection
Connection & connection
Definition
Client.h:16
joedb::Connection
Definition
Connection.h:48
joedb::Database
Definition
Database.h:10
joedb::Readonly_Client
Specialized client for read-only files.
Definition
Readonly_Client.h:16
joedb::Readonly_Database_Client
Definition
Readonly_Database_Client.h:11
joedb::Readonly_Database_Client::read_journal
void read_journal() override
Definition
Readonly_Database_Client.h:16
joedb::Readonly_Database_Client::Readonly_Database_Client
Readonly_Database_Client(Buffered_File &file, Connection &connection, Content_Check content_check=Content_Check::fast, Recovery recovery=Recovery::none)
Definition
Readonly_Database_Client.h:23
joedb::Readonly_Database_Client::get_database
const Database & get_database() const
Definition
Readonly_Database_Client.h:34
joedb::Readonly_Journal::play_until_checkpoint
void play_until_checkpoint(Writable &writable)
Definition
Readonly_Journal.h:106
joedb::Readonly_Journal::file
Buffered_File & file
Definition
Readonly_Journal.h:30
joedb::Content_Check
Content_Check
Definition
Connection.h:19
joedb::Content_Check::fast
@ fast
joedb::Recovery
Recovery
Definition
Journal_Construction_Lock.h:10
joedb::Recovery::none
@ none
default: fail if file size > checkpoint
joedb
Definition
Blob.h:7
Readonly_Client.h
Database.h
Generated by
1.9.8