diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-12 17:24:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-19 11:40:30 +0200 |
commit | d94948b8bccfd8748245726487d54c41bb199baf (patch) | |
tree | c83176902ed8cb3c49532078e0705e2fc6621555 /odb/sqlite/statement.cxx | |
parent | 1c8dc77a0feae8b33e8c06f7ba076bd26d278054 (diff) |
Completion of prepared query support
Diffstat (limited to 'odb/sqlite/statement.cxx')
-rw-r--r-- | odb/sqlite/statement.cxx | 16 |
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; |