diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-09-04 13:40:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-09-04 13:40:31 +0200 |
commit | 485ae35a88fe2500574797d7342cfa7585e9e191 (patch) | |
tree | 977ba286e2d5d2659ab691d8173f556bf60a3594 /odb/pgsql/view-result.txx | |
parent | 259a683ec2a4f777f605bdd527b9882c3a965ee3 (diff) |
View versioning support
Diffstat (limited to 'odb/pgsql/view-result.txx')
-rw-r--r-- | odb/pgsql/view-result.txx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/odb/pgsql/view-result.txx b/odb/pgsql/view-result.txx index cf29d00..9f126b9 100644 --- a/odb/pgsql/view-result.txx +++ b/odb/pgsql/view-result.txx @@ -35,10 +35,12 @@ namespace odb view_result_impl<T>:: view_result_impl (const query_base&, details::shared_ptr<select_statement> statement, - statements_type& statements) + statements_type& statements, + const schema_version_migration* svm) : base_type (statements.connection ()), statement_ (statement), statements_ (statements), + tc_ (svm), count_ (0) { } @@ -55,7 +57,7 @@ namespace odb if (im.version != statements_.image_version ()) { binding& b (statements_.image_binding ()); - view_traits::bind (b.bind, im); + tc_.bind (b.bind, im); statements_.image_version (im.version); b.version++; } @@ -64,13 +66,13 @@ namespace odb if (r == select_statement::truncated) { - if (view_traits::grow (im, statements_.image_truncated ())) + if (tc_.grow (im, statements_.image_truncated ())) im.version++; if (im.version != statements_.image_version ()) { binding& b (statements_.image_binding ()); - view_traits::bind (b.bind, im); + tc_.bind (b.bind, im); statements_.image_version (im.version); b.version++; statement_->reload (); @@ -78,7 +80,7 @@ namespace odb } view_traits::callback (this->db_, view, callback_event::pre_load); - view_traits::init (view, im, &this->db_); + tc_.init (view, im, &this->db_); view_traits::callback (this->db_, view, callback_event::post_load); } |