diff options
Diffstat (limited to 'odb/sqlite/section-statements.hxx')
-rw-r--r-- | odb/sqlite/section-statements.hxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/odb/sqlite/section-statements.hxx b/odb/sqlite/section-statements.hxx index 8bdbda1..dff5ec5 100644 --- a/odb/sqlite/section-statements.hxx +++ b/odb/sqlite/section-statements.hxx @@ -10,12 +10,15 @@ #include <cstddef> // std::size_t #include <odb/forward.hxx> +#include <odb/schema-version.hxx> #include <odb/traits.hxx> #include <odb/sqlite/version.hxx> #include <odb/sqlite/sqlite-types.hxx> #include <odb/sqlite/binding.hxx> #include <odb/sqlite/statement.hxx> +#include <odb/sqlite/connection.hxx> +#include <odb/sqlite/database.hxx> #include <odb/sqlite/details/export.hxx> namespace odb @@ -46,6 +49,15 @@ namespace odb connection_type& connection () {return conn_;} + const schema_version_migration& + version_migration (const char* name = "") const + { + if (svm_ == 0) + svm_ = &conn_.database ().schema_version_migration (name); + + return *svm_; + } + image_type& image () {return image_;} @@ -138,6 +150,7 @@ namespace odb protected: connection_type& conn_; + mutable const schema_version_migration* svm_; // These come from object_statements. // |