diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-07-26 15:43:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-07-26 15:43:07 +0200 |
commit | 57ef48552e7d855151bac235a9f1af21255c8474 (patch) | |
tree | dcb41796db3a9c10fff946919dd1fd9994eaad33 /odb/mysql/statement.cxx | |
parent | 904c0628b231cb19a065df8e15b09c25676beeb9 (diff) |
Add base support for statements, insert_statement and cache
Diffstat (limited to 'odb/mysql/statement.cxx')
-rw-r--r-- | odb/mysql/statement.cxx | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/odb/mysql/statement.cxx b/odb/mysql/statement.cxx new file mode 100644 index 0000000..68449ae --- /dev/null +++ b/odb/mysql/statement.cxx @@ -0,0 +1,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 () + { + } + } +} |