Skip to content

Commit e779e68

Browse files
authored
Merge pull request #305 Add other constants that work with sqlite3_open_v2 from LuAPi/more-flags
2 parents 114f89d + 503afc3 commit e779e68

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

include/SQLiteCpp/Database.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,21 @@ extern const int OPEN_READONLY; // SQLITE_OPEN_READONLY
4545
extern const int OPEN_READWRITE; // SQLITE_OPEN_READWRITE
4646
/// With OPEN_READWRITE: The database is opened for reading and writing, and is created if it does not already exist.
4747
extern const int OPEN_CREATE; // SQLITE_OPEN_CREATE
48-
/// Open database with thread-safety
49-
extern const int OPEN_FULLMUTEX; // SQLITE_OPEN_FULLMUTEX
50-
5148
/// Enable URI filename interpretation, parsed according to RFC 3986 (ex. "file:data.db?mode=ro&cache=private")
5249
extern const int OPEN_URI; // SQLITE_OPEN_URI
50+
/// Open in memory database
51+
extern const int OPEN_MEMORY; // SQLITE_OPEN_MEMORY
52+
/// Open database in multi-thread threading mode
53+
extern const int OPEN_NOMUTEX; // SQLITE_OPEN_NOMUTEX
54+
/// Open database with thread-safety in serialized threading mode
55+
extern const int OPEN_FULLMUTEX; // SQLITE_OPEN_FULLMUTEX
56+
/// Open database with shared cache enabled
57+
extern const int OPEN_SHAREDCACHE; // SQLITE_OPEN_SHAREDCACHE
58+
/// Open database with shared cache disabled
59+
extern const int OPEN_PRIVATECACHE; // SQLITE_OPEN_PRIVATECACHE
60+
/// Database filename is not allowed to be a symbolic link
61+
extern const int OPEN_NOFOLLOW; // SQLITE_OPEN_NOFOLLOW
62+
5363

5464
extern const int OK; ///< SQLITE_OK (used by check() bellow)
5565

src/Database.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@
2727
namespace SQLite
2828
{
2929

30-
const int OPEN_READONLY = SQLITE_OPEN_READONLY;
31-
const int OPEN_READWRITE = SQLITE_OPEN_READWRITE;
32-
const int OPEN_CREATE = SQLITE_OPEN_CREATE;
33-
const int OPEN_URI = SQLITE_OPEN_URI;
34-
const int OPEN_FULLMUTEX = SQLITE_OPEN_FULLMUTEX;
30+
const int OPEN_READONLY = SQLITE_OPEN_READONLY;
31+
const int OPEN_READWRITE = SQLITE_OPEN_READWRITE;
32+
const int OPEN_CREATE = SQLITE_OPEN_CREATE;
33+
const int OPEN_URI = SQLITE_OPEN_URI;
34+
const int OPEN_MEMORY = SQLITE_OPEN_MEMORY;
35+
const int OPEN_NOMUTEX = SQLITE_OPEN_NOMUTEX;
36+
const int OPEN_FULLMUTEX = SQLITE_OPEN_FULLMUTEX;
37+
const int OPEN_SHAREDCACHE = SQLITE_OPEN_SHAREDCACHE;
38+
const int OPEN_PRIVATECACHE = SQLITE_OPEN_PRIVATECACHE;
39+
const int OPEN_NOFOLLOW = SQLITE_OPEN_NOFOLLOW;
3540

3641
const int OK = SQLITE_OK;
3742

0 commit comments

Comments
 (0)