Joedb 9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Open_Mode.h
Go to the documentation of this file.
1#ifndef joedb_Open_Mode_declared
2#define joedb_Open_Mode_declared
3
4namespace joedb
5{
6 /// @ingroup journal
7 enum class Open_Mode
8 {
9 read_existing, ///< fails if does not exist
10 write_existing, ///< fails if does not exist or locked, locks the file for writing
11 create_new, ///< fails if already exists, locks the file for writing
12 write_existing_or_create_new, ///< either write_existing or create_new depending on whether the file exists. Racy in Posix, not in Windows.
13 shared_write, ///< like write_existing_or_create_new, but does not lock the file, and does not fail if locked
14 write_lock, ///< like write_existing_or_create_new, but waits instead of failing if already locked
15 mode_count ///< number of modes
16 };
17}
18
19#endif
Open_Mode
Definition Open_Mode.h:8
@ create_new
fails if already exists, locks the file for writing
@ mode_count
number of modes
@ write_existing
fails if does not exist or locked, locks the file for writing
@ shared_write
like write_existing_or_create_new, but does not lock the file, and does not fail if locked
@ write_existing_or_create_new
either write_existing or create_new depending on whether the file exists. Racy in Posix,...
@ write_lock
like write_existing_or_create_new, but waits instead of failing if already locked
@ read_existing
fails if does not exist
Definition Blob.h:7