aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/simple-object-result.txx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/sqlite/simple-object-result.txx')
-rw-r--r--odb/sqlite/simple-object-result.txx18
1 files changed, 10 insertions, 8 deletions
diff --git a/odb/sqlite/simple-object-result.txx b/odb/sqlite/simple-object-result.txx
index fe31300..2c4340d 100644
--- a/odb/sqlite/simple-object-result.txx
+++ b/odb/sqlite/simple-object-result.txx
@@ -39,11 +39,13 @@ namespace odb
object_result_impl<T>::
object_result_impl (const query_base& q,
const details::shared_ptr<select_statement>& s,
- statements_type& sts)
+ statements_type& sts,
+ const schema_version_migration* svm)
: base_type (sts.connection ()),
params_ (q.parameters ()),
statement_ (s),
- statements_ (sts)
+ statements_ (sts),
+ tc_ (svm)
{
}
@@ -62,7 +64,7 @@ namespace odb
object_traits::callback (this->db_, obj, callback_event::pre_load);
typename object_traits::image_type& i (statements_.image ());
- object_traits::init (obj, i, &this->db_);
+ tc_.init (obj, i, &this->db_);
// Initialize the id image and binding and load the rest of the object
// (containers, etc).
@@ -78,8 +80,8 @@ namespace odb
idb.version++;
}
- object_traits::load_ (statements_, obj);
- statements_.load_delayed ();
+ tc_.load_ (statements_, obj, false);
+ statements_.load_delayed (tc_.version ());
l.unlock ();
object_traits::callback (this->db_, obj, callback_event::post_load);
}
@@ -118,7 +120,7 @@ namespace odb
if (im.version != statements_.select_image_version ())
{
binding& b (statements_.select_image_binding ());
- object_traits::bind (b.bind, im, statement_select);
+ tc_.bind (b.bind, im, statement_select);
statements_.select_image_version (im.version);
b.version++;
}
@@ -127,13 +129,13 @@ namespace odb
if (r == select_statement::truncated)
{
- if (object_traits::grow (im, statements_.select_image_truncated ()))
+ if (tc_.grow (im, statements_.select_image_truncated ()))
im.version++;
if (im.version != statements_.select_image_version ())
{
binding& b (statements_.select_image_binding ());
- object_traits::bind (b.bind, im, statement_select);
+ tc_.bind (b.bind, im, statement_select);
statements_.select_image_version (im.version);
b.version++;
statement_->reload ();