aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/prepared-query.cxx
blob: 79df0f200fd93e113dd094a687dd9ced32da108c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 ();
    }
  }
}