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.cxx41
1 files changed, 10 insertions, 31 deletions
diff --git a/odb/sqlite/statement.cxx b/odb/sqlite/statement.cxx
index ce194ed..09cf994 100644
--- a/odb/sqlite/statement.cxx
+++ b/odb/sqlite/statement.cxx
@@ -24,22 +24,18 @@ namespace odb
statement::
~statement ()
{
- if (stmt_ != 0)
- finilize ();
- }
-
- void statement::
- cached (bool cached)
- {
- assert (cached);
-
- if (!cached_)
{
- if (!active_)
- list_remove ();
-
- cached_ = true;
+ odb::tracer* t;
+ if ((t = conn_.transaction_tracer ()) ||
+ (t = conn_.tracer ()) ||
+ (t = conn_.database ().tracer ()))
+ t->deallocate (conn_, *this);
}
+
+ if (next_ != this)
+ list_remove ();
+
+ stmt_.reset ();
}
void statement::
@@ -65,8 +61,6 @@ namespace odb
prev_ = 0;
next_ = this;
- list_add (); // Add to the list because we are uncached.
-
{
odb::tracer* t;
if ((t = conn_.transaction_tracer ()) ||
@@ -76,21 +70,6 @@ namespace odb
}
}
- void statement::
- finilize ()
- {
- {
- odb::tracer* t;
- if ((t = conn_.transaction_tracer ()) ||
- (t = conn_.tracer ()) ||
- (t = conn_.database ().tracer ()))
- t->deallocate (conn_, *this);
- }
-
- list_remove ();
- stmt_.reset ();
- }
-
const char* statement::
text () const
{