From 275f4e494cacd403d28b01f8e3356a6669ef8e13 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 Oct 2013 08:29:06 +0200 Subject: Add support for SQLite 3.3.6 That's what is still shipped with RHEL5. --- odb/sqlite/statement.hxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'odb/sqlite/statement.hxx') diff --git a/odb/sqlite/statement.hxx b/odb/sqlite/statement.hxx index 05fa9bd..7d7f021 100644 --- a/odb/sqlite/statement.hxx +++ b/odb/sqlite/statement.hxx @@ -131,15 +131,19 @@ namespace odb } } - void + int reset () { + int r (SQLITE_OK); + if (active_) { - sqlite3_reset (stmt_); + r = sqlite3_reset (stmt_); list_remove (); active_ = false; } + + return r; } protected: @@ -148,6 +152,10 @@ namespace odb connection_type& conn_; auto_handle stmt_; +#if SQLITE_VERSION_NUMBER < 3005003 + std::string text_; +#endif + bool active_; private: @@ -160,7 +168,7 @@ namespace odb // Doubly-linked list of active statements. // - private: + protected: void list_add () { -- cgit v1.1