From 95143f4028efb896348008dc4cf4ce2d5925f720 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 6 Sep 2012 14:36:20 +0200 Subject: Add ability to specify SQLite vfs module in database constructor --- odb/sqlite/connection.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'odb/sqlite/connection.cxx') 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) -- cgit v1.1