diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-24 19:01:19 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-24 19:01:19 +0300 |
commit | e5d0186db99492a139237067bab841a5b83463af (patch) | |
tree | 61719595e998314e58383c5081da16d7457a63e7 /libodb-sqlite/odb/sqlite/prepared-query.cxx | |
parent | c53136bd7d266fccaca679d0471dd8ac0ce91373 (diff) |
Turn libodb-sqlite repository into package for muti-package repositorylibodb-sqlite
Diffstat (limited to 'libodb-sqlite/odb/sqlite/prepared-query.cxx')
-rw-r--r-- | libodb-sqlite/odb/sqlite/prepared-query.cxx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libodb-sqlite/odb/sqlite/prepared-query.cxx b/libodb-sqlite/odb/sqlite/prepared-query.cxx new file mode 100644 index 0000000..79df0f2 --- /dev/null +++ b/libodb-sqlite/odb/sqlite/prepared-query.cxx @@ -0,0 +1,27 @@ +// file : odb/sqlite/prepared-query.cxx +// license : GNU GPL v2; see accompanying LICENSE file + +#include <odb/sqlite/prepared-query.hxx> + +#include <odb/sqlite/connection.hxx> + +namespace odb +{ + namespace sqlite + { + prepared_query_impl:: + ~prepared_query_impl () + { + } + + bool prepared_query_impl:: + verify_connection (odb::transaction& t) + { + // The transaction can be started using the main database of any of the + // attached databases. So we verify the main connections match. + // + return &static_cast<connection&> (t.connection ()).main_connection () == + &static_cast<connection&> (stmt->connection ()).main_connection (); + } + } +} |