aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/statement.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-01-27 18:34:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-01-27 18:34:18 +0200
commit8c41d647fab4dfbd0a9979514f95431dfc19e00b (patch)
tree55a1634b0ccaf337ee12dc54d5b11f6c4bb4f391 /odb/sqlite/statement.cxx
parent4e31e3dcf3efcc20ca3aee6f888fe3ec56ba78e3 (diff)
Detect if column metadata functions are available
For example, system-default build of SQLite doesn't have SQLITE_ENABLE_COLUMN_METADATA.
Diffstat (limited to 'odb/sqlite/statement.cxx')
-rw-r--r--odb/sqlite/statement.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/odb/sqlite/statement.cxx b/odb/sqlite/statement.cxx
index f7ce632..ce6458a 100644
--- a/odb/sqlite/statement.cxx
+++ b/odb/sqlite/statement.cxx
@@ -11,7 +11,7 @@
#include <odb/sqlite/error.hxx>
#include <odb/sqlite/details/config.hxx> // LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY
-
+ // LIBODB_SQLITE_HAVE_COLUMN_METADATA
using namespace std;
namespace odb
@@ -355,9 +355,13 @@ namespace odb
// we do while executing the statement (i.e., we don't copy
// images for later processing).
//
+#ifdef LIBODB_SQLITE_HAVE_COLUMN_METADATA
sb.db.in = sqlite3_column_database_name (stmt_, c);
sb.table.in = sqlite3_column_table_name (stmt_, c);
sb.column.in = sqlite3_column_origin_name (stmt_, c);
+#else
+ assert (false);
+#endif
// The ROWID comes in the following column.
//