aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/statement.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/sqlite/statement.cxx')
-rw-r--r--odb/sqlite/statement.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/odb/sqlite/statement.cxx b/odb/sqlite/statement.cxx
index 5955b33..ce194ed 100644
--- a/odb/sqlite/statement.cxx
+++ b/odb/sqlite/statement.cxx
@@ -29,6 +29,20 @@ namespace odb
}
void statement::
+ cached (bool cached)
+ {
+ assert (cached);
+
+ if (!cached_)
+ {
+ if (!active_)
+ list_remove ();
+
+ cached_ = true;
+ }
+ }
+
+ void statement::
init (const char* text, std::size_t text_size)
{
int e;
@@ -46,9 +60,7 @@ namespace odb
translate_error (e, conn_);
stmt_.reset (stmt);
-
active_ = false;
- cached_ = false;
prev_ = 0;
next_ = this;