aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/connection.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-09-06 14:36:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-09-06 14:36:20 +0200
commit95143f4028efb896348008dc4cf4ce2d5925f720 (patch)
tree219ebd633f19251ddd8c2a53f889e659ee00bcc4 /odb/sqlite/connection.cxx
parent158b06969b0c8438afda841b63c5fec7ed186725 (diff)
Add ability to specify SQLite vfs module in database constructor
Diffstat (limited to 'odb/sqlite/connection.cxx')
-rw-r--r--odb/sqlite/connection.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/odb/sqlite/connection.cxx b/odb/sqlite/connection.cxx
index 38f622d..22955b4 100644
--- a/odb/sqlite/connection.cxx
+++ b/odb/sqlite/connection.cxx
@@ -48,8 +48,12 @@ namespace odb
if ((f & SQLITE_OPEN_FULLMUTEX) == 0)
f |= SQLITE_OPEN_NOMUTEX;
+ const string& vfs (db.vfs ());
+
sqlite3* h (0);
- int e (sqlite3_open_v2 (n.c_str (), &h, f, 0));
+ int e (
+ sqlite3_open_v2 (
+ n.c_str (), &h, f, (vfs.empty () ? 0 : vfs.c_str ())));
handle_.reset (h);
if (e != SQLITE_OK)