aboutsummaryrefslogtreecommitdiff
path: root/odb/connection.ixx
blob: 0e6d24c0c168ac4dae57221ad0627d581beba2a5 (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
// file      : odb/connection.ixx
// author    : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
// license   : GNU GPL v2; see accompanying LICENSE file

#include <cstring> // std::string

namespace odb
{
  inline connection::
  connection (database_type& database)
      : database_ (database)
  {
  }

  inline connection::database_type& connection::
  database ()
  {
    return database_;
  }

  inline unsigned long long connection::
  execute (const char* st)
  {
    return execute (st, std::strlen (st));
  }

  inline unsigned long long connection::
  execute (const std::string& st)
  {
    return execute (st.c_str (), st.size ());
  }
}