Skip to content

Commit 503afc3

Browse files
committed
Add other constants that work with sqlite3_open_v2
1 parent adb7e7c commit 503afc3

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
@@ -38,11 +38,21 @@ extern const int OPEN_READONLY; // SQLITE_OPEN_READONLY
3838
extern const int OPEN_READWRITE; // SQLITE_OPEN_READWRITE
3939
/// With OPEN_READWRITE: The database is opened for reading and writing, and is created if it does not already exist.
4040
extern const int OPEN_CREATE; // SQLITE_OPEN_CREATE
41-
/// Open database with thread-safety
42-
extern const int OPEN_FULLMUTEX; // SQLITE_OPEN_FULLMUTEX
43-
4441
/// Enable URI filename interpretation, parsed according to RFC 3986 (ex. "file:data.db?mode=ro&cache=private")
4542
extern const int OPEN_URI; // SQLITE_OPEN_URI
43+
/// Open in memory database
44+
extern const int OPEN_MEMORY; // SQLITE_OPEN_MEMORY
45+
/// Open database in multi-thread threading mode
46+
extern const int OPEN_NOMUTEX; // SQLITE_OPEN_NOMUTEX
47+
/// Open database with thread-safety in serialized threading mode
48+
extern const int OPEN_FULLMUTEX; // SQLITE_OPEN_FULLMUTEX
49+
/// Open database with shared cache enabled
50+
extern const int OPEN_SHAREDCACHE; // SQLITE_OPEN_SHAREDCACHE
51+
/// Open database with shared cache disabled
52+
extern const int OPEN_PRIVATECACHE; // SQLITE_OPEN_PRIVATECACHE
53+
/// Database filename is not allowed to be a symbolic link
54+
extern const int OPEN_NOFOLLOW; // SQLITE_OPEN_NOFOLLOW
55+
4656

4757
extern const int OK; ///< SQLITE_OK (used by check() bellow)
4858

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)