diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-09-06 14:36:20 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-09-06 14:36:20 +0200 |
commit | 95143f4028efb896348008dc4cf4ce2d5925f720 (patch) | |
tree | 219ebd633f19251ddd8c2a53f889e659ee00bcc4 /odb/sqlite/connection.cxx | |
parent | 158b06969b0c8438afda841b63c5fec7ed186725 (diff) |
Add ability to specify SQLite vfs module in database constructor
Diffstat (limited to 'odb/sqlite/connection.cxx')
-rw-r--r-- | odb/sqlite/connection.cxx | 6 |
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) |