blob: 68449ae5b40d438d5e63414fd59a4061400f5dcc (
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
41
42
|
// file : odb/mysql/statement.cxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#include <new> // std::bad_alloc
#include <odb/mysql/statement.hxx>
#include <odb/mysql/connection.hxx>
namespace odb
{
namespace mysql
{
// statement
//
statement::
statement (connection& conn)
: conn_ (conn)
{
stmt_ = mysql_stmt_init (conn_.handle ());
if (stmt_ == 0)
throw std::bad_alloc ();
}
statement::
~statement ()
{
mysql_stmt_close (stmt_);
}
// object_statements_base
//
object_statements_base::
~object_statements_base ()
{
}
}
}
|