blob: 5e032ee3142614109d1cd3aa9ae39c1878ead2b6 (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// file : odb/tracer/database.cxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#include <odb/tracer/database.hxx>
#include <odb/tracer/connection.hxx>
namespace odb
{
namespace tracer
{
database::
~database ()
{
}
transaction_impl* database::
begin ()
{
return new transaction_impl (*this);
}
connection_ptr database::
connection ()
{
// Go through the virtual connection_() function instead of
// directly to allow overriding.
//
return connection_ptr (
static_cast<tracer::connection*> (connection_ ()));
}
odb::connection* database::
connection_ ()
{
return new (details::shared) connection_type (*this);
}
}
}
|