aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/container-statements.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/oracle/container-statements.hxx')
-rw-r--r--odb/oracle/container-statements.hxx25
1 files changed, 23 insertions, 2 deletions
diff --git a/odb/oracle/container-statements.hxx b/odb/oracle/container-statements.hxx
index 4da7af4..ef1733d 100644
--- a/odb/oracle/container-statements.hxx
+++ b/odb/oracle/container-statements.hxx
@@ -10,6 +10,7 @@
#include <cstddef> // std::size_t
#include <odb/forward.hxx>
+#include <odb/schema-version.hxx>
#include <odb/traits.hxx>
#include <odb/oracle/version.hxx>
@@ -58,6 +59,14 @@ namespace odb
return functions_;
}
+ // Schema version.
+ //
+ const schema_version_migration&
+ version_migration () const {return *svm_;}
+
+ void
+ version_migration (const schema_version_migration& svm) {svm_ = &svm;}
+
// Id image binding (external).
//
const binding&
@@ -109,7 +118,11 @@ namespace odb
if (insert_ == 0)
insert_.reset (
new (details::shared) insert_statement_type (
- conn_, insert_text_, insert_image_binding_, false));
+ conn_,
+ insert_text_,
+ versioned_, // Process if versioned.
+ insert_image_binding_,
+ false));
return *insert_;
}
@@ -122,6 +135,8 @@ namespace odb
new (details::shared) select_statement_type (
conn_,
select_text_,
+ versioned_, // Process if versioned.
+ false, // Don't optimize.
id_binding_,
select_image_binding_,
4096)); // Hardcode a 4kB LOB prefetch size.
@@ -161,6 +176,9 @@ namespace odb
const char* select_text_;
const char* delete_text_;
+ bool versioned_;
+ const schema_version_migration* svm_;
+
details::shared_ptr<insert_statement_type> insert_;
details::shared_ptr<select_statement_type> select_;
details::shared_ptr<delete_statement_type> delete_;
@@ -260,7 +278,10 @@ namespace odb
if (update_ == 0)
update_.reset (
new (details::shared) update_statement_type (
- this->conn_, update_text_, update_image_binding_));
+ this->conn_,
+ update_text_,
+ this->versioned_, // Process if versioned.
+ update_image_binding_));
return *update_;
}