summaryrefslogtreecommitdiff
path: root/odb/mssql/statements-base.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-02-01 18:10:29 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-02-01 18:10:29 +0300
commit2895ad78dbdb43e57fc34558b4530b4e105fc72d (patch)
tree9a176c9a1a34cfa9df60fcf482bc6c360ae11214 /odb/mssql/statements-base.hxx
parent8ac5c705c360b9ccde527eea24ddc90b2f6ed7ec (diff)
Turn libodb-mssql repository into package for muti-package repositorylibodb-mssql
Diffstat (limited to 'odb/mssql/statements-base.hxx')
-rw-r--r--odb/mssql/statements-base.hxx63
1 files changed, 0 insertions, 63 deletions
diff --git a/odb/mssql/statements-base.hxx b/odb/mssql/statements-base.hxx
deleted file mode 100644
index 4506628..0000000
--- a/odb/mssql/statements-base.hxx
+++ /dev/null
@@ -1,63 +0,0 @@
-// file : odb/mssql/statements-base.hxx
-// license : ODB NCUEL; see accompanying LICENSE file
-
-#ifndef ODB_MSSQL_STATEMENTS_BASE_HXX
-#define ODB_MSSQL_STATEMENTS_BASE_HXX
-
-#include <odb/pre.hxx>
-
-#include <odb/schema-version.hxx>
-#include <odb/details/shared-ptr.hxx>
-
-#include <odb/mssql/version.hxx>
-#include <odb/mssql/connection.hxx>
-#include <odb/mssql/database.hxx>
-
-#include <odb/mssql/details/export.hxx>
-
-namespace odb
-{
- namespace mssql
- {
- class LIBODB_MSSQL_EXPORT statements_base: public details::shared_base
- {
- public:
- typedef mssql::connection connection_type;
-
- connection_type&
- connection ()
- {
- return conn_;
- }
-
- // Schema version. database::schema_version_migration() is thread-
- // safe which means it is also slow. Cache the result in statements
- // so we can avoid the mutex lock. This is thread-safe since if the
- // version is updated, then the statements cache will be expired.
- //
- const schema_version_migration&
- version_migration (const char* name = "") const
- {
- if (svm_ == 0)
- svm_ = &conn_.database ().schema_version_migration (name);
-
- return *svm_;
- }
-
- public:
- virtual
- ~statements_base ();
-
- protected:
- statements_base (connection_type& conn): conn_ (conn), svm_ (0) {}
-
- protected:
- connection_type& conn_;
- mutable const schema_version_migration* svm_;
- };
- }
-}
-
-#include <odb/post.hxx>
-
-#endif // ODB_MSSQL_STATEMENTS_BASE_HXX