aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL10
-rw-r--r--configure.ac3
-rw-r--r--m4/libsqlite.m425
-rw-r--r--odb/sqlite/details/config.h.in1
-rw-r--r--odb/sqlite/libodb-sqlite-vc10.vcxproj8
-rw-r--r--odb/sqlite/libodb-sqlite-vc11.vcxproj8
-rw-r--r--odb/sqlite/libodb-sqlite-vc12.vcxproj8
-rw-r--r--odb/sqlite/libodb-sqlite-vc8.vcproj8
-rw-r--r--odb/sqlite/libodb-sqlite-vc9.vcproj8
-rw-r--r--odb/sqlite/makefile1
-rw-r--r--odb/sqlite/statement.cxx6
11 files changed, 62 insertions, 24 deletions
diff --git a/INSTALL b/INSTALL
index 2a55ef1..63fae36 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,9 +4,13 @@ Prerequisites
- libodb http://www.codesynthesis.com/products/odb/
- libsqlite3 http://www.sqlite.org
-If you plan to access an SQLite database from multiple threads, then
-you will need SQLite version 3.5.0 or later built with the unlock
-notify feature (SQLITE_ENABLE_UNLOCK_NOTIFY) enabled.
+If you plan to access an SQLite database from multiple threads, then you will
+need SQLite version 3.5.0 or later built with the unlock notify feature
+(SQLITE_ENABLE_UNLOCK_NOTIFY) enabled.
+
+If you plant to use SQLite incremental BLOB/TEXT I/O support, then you will
+need SQLite version 3.4.0 or later built with the column metadata functions
+(SQLITE_ENABLE_COLUMN_METADATA) enabled.
Building on UNIX
diff --git a/configure.ac b/configure.ac
index 4e9b4a5..40c84e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,9 @@ LIBSQLITE(
AS_IF([test x$libsqlite_unlock_notify = xyes],
AC_DEFINE([LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY], [1], [Have sqlite3_unlock_notify.]))
+AS_IF([test x$libsqlite_column_metadata = xyes],
+AC_DEFINE([LIBODB_SQLITE_HAVE_COLUMN_METADATA], [1], [Have column metadata functions.]))
+
AS_IF([test x$threads != xnone -a x$libsqlite_unlock_notify = xno],
AC_MSG_WARN([libsqlite3 is built without sqlite3_unlock_notify support; multi-threaded support will be limited]))
diff --git a/m4/libsqlite.m4 b/m4/libsqlite.m4
index a8fe4f7..36f92f8 100644
--- a/m4/libsqlite.m4
+++ b/m4/libsqlite.m4
@@ -7,9 +7,13 @@ dnl
dnl Also sets libsqlite_unlock_notify to yes if sqlite3_unlock_notify()
dnl functionality is available.
dnl
+dnl Also sets libsqlite_column_metadata to yes if sqlite3_column_*()
+dnl functions are available.
+dnl
AC_DEFUN([LIBSQLITE], [
libsqlite_found=no
libsqlite_unlock_notify=no
+libsqlite_column_metadata=no
AC_MSG_CHECKING([for libsqlite3])
@@ -58,6 +62,27 @@ libsqlite_unlock_notify=yes
])
fi
+# Check for column_metadata.
+#
+if test x"$libsqlite_found" = xyes; then
+CXX_LIBTOOL_LINK_IFELSE([
+AC_LANG_SOURCE([
+#include <sqlite3.h>
+
+int
+main ()
+{
+ sqlite3_stmt* stmt (0);
+ sqlite3_column_database_name (stmt, 0);
+ sqlite3_column_table_name (stmt, 0);
+ sqlite3_column_origin_name (stmt, 0);
+}
+])],
+[
+libsqlite_column_metadata=yes
+])
+fi
+
if test x"$libsqlite_found" = xyes; then
AC_MSG_RESULT([yes])
$1
diff --git a/odb/sqlite/details/config.h.in b/odb/sqlite/details/config.h.in
index c8158be..9c2d2d7 100644
--- a/odb/sqlite/details/config.h.in
+++ b/odb/sqlite/details/config.h.in
@@ -10,5 +10,6 @@
#undef LIBODB_SQLITE_STATIC_LIB
#undef LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY
+#undef LIBODB_SQLITE_HAVE_COLUMN_METADATA
#endif /* ODB_SQLITE_DETAILS_CONFIG_H */
diff --git a/odb/sqlite/libodb-sqlite-vc10.vcxproj b/odb/sqlite/libodb-sqlite-vc10.vcxproj
index 974aa48..844eeb4 100644
--- a/odb/sqlite/libodb-sqlite-vc10.vcxproj
+++ b/odb/sqlite/libodb-sqlite-vc10.vcxproj
@@ -88,7 +88,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4355;4800;4290;4251;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
@@ -106,7 +106,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4355;4800;4290;4251;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
@@ -126,7 +126,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4355;4800;4290;4251;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
@@ -148,7 +148,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4355;4800;4290;4251;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
diff --git a/odb/sqlite/libodb-sqlite-vc11.vcxproj b/odb/sqlite/libodb-sqlite-vc11.vcxproj
index 3ec1701..670370c 100644
--- a/odb/sqlite/libodb-sqlite-vc11.vcxproj
+++ b/odb/sqlite/libodb-sqlite-vc11.vcxproj
@@ -92,7 +92,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4355;4800;4290;4251;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
@@ -110,7 +110,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4355;4800;4290;4251;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
@@ -130,7 +130,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4355;4800;4290;4251;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
@@ -152,7 +152,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4355;4800;4290;4251;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
diff --git a/odb/sqlite/libodb-sqlite-vc12.vcxproj b/odb/sqlite/libodb-sqlite-vc12.vcxproj
index d83b7f7..f74ccbc 100644
--- a/odb/sqlite/libodb-sqlite-vc12.vcxproj
+++ b/odb/sqlite/libodb-sqlite-vc12.vcxproj
@@ -92,7 +92,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4355;4800;4290;4251;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<SDLCheck>true</SDLCheck>
@@ -111,7 +111,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4355;4800;4290;4251;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<SDLCheck>true</SDLCheck>
@@ -132,7 +132,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4355;4800;4290;4251;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<SDLCheck>true</SDLCheck>
@@ -155,7 +155,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4355;4800;4290;4251;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<SDLCheck>true</SDLCheck>
diff --git a/odb/sqlite/libodb-sqlite-vc8.vcproj b/odb/sqlite/libodb-sqlite-vc8.vcproj
index 7bcc784..ef5c743 100644
--- a/odb/sqlite/libodb-sqlite-vc8.vcproj
+++ b/odb/sqlite/libodb-sqlite-vc8.vcproj
@@ -45,7 +45,7 @@
AdditionalOptions="/wd4355 /wd4800 /wd4290 /wd4267"
Optimization="0"
AdditionalIncludeDirectories="..\.."
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -123,7 +123,7 @@
AdditionalOptions="/wd4355 /wd4800 /wd4290 /wd4267"
Optimization="0"
AdditionalIncludeDirectories="..\.."
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -200,7 +200,7 @@
Name="VCCLCompilerTool"
AdditionalOptions="/wd4355 /wd4800 /wd4290 /wd4267"
AdditionalIncludeDirectories="..\.."
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
@@ -278,7 +278,7 @@
Name="VCCLCompilerTool"
AdditionalOptions="/wd4355 /wd4800 /wd4290 /wd4267"
AdditionalIncludeDirectories="..\.."
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
diff --git a/odb/sqlite/libodb-sqlite-vc9.vcproj b/odb/sqlite/libodb-sqlite-vc9.vcproj
index 1bcec78..f21c203 100644
--- a/odb/sqlite/libodb-sqlite-vc9.vcproj
+++ b/odb/sqlite/libodb-sqlite-vc9.vcproj
@@ -46,7 +46,7 @@
AdditionalOptions="/wd4355 /wd4800 /wd4290 /wd4267"
Optimization="0"
AdditionalIncludeDirectories="..\.."
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -124,7 +124,7 @@
AdditionalOptions="/wd4355 /wd4800 /wd4290 /wd4267"
Optimization="0"
AdditionalIncludeDirectories="..\.."
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -203,7 +203,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\.."
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
@@ -284,7 +284,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\.."
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_SQLITE_DYNAMIC_LIB;LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY;LIBODB_SQLITE_HAVE_COLUMN_METADATA"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
diff --git a/odb/sqlite/makefile b/odb/sqlite/makefile
index 812e153..abee73e 100644
--- a/odb/sqlite/makefile
+++ b/odb/sqlite/makefile
@@ -89,6 +89,7 @@ $(out_base)/details/config.h: | $(out_base)/details/.
@echo '#if SQLITE_VERSION_NUMBER >= 3006012' >>$@
@echo ' #define LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY 1' >>$@
@echo '#endif' >>$@
+ @echo '#define LIBODB_SQLITE_HAVE_COLUMN_METADATA 1' >>$@
@echo '' >>$@
@echo '#endif /* ODB_SQLITE_DETAILS_CONFIG_H */' >>$@
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.
//