diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-07-26 15:44:33 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-07-26 15:44:33 +0200 |
commit | fb33a851b418653872fa564fcd2c60682298e35b (patch) | |
tree | ca9505cd5a96acd40f488f7522db0fb3ca6b5623 /odb/mysql/source.cxx | |
parent | 30d797ffff4a8e2492500aea2135567f91b15aa0 (diff) |
Add stubs for the next chunk of functionality
Diffstat (limited to 'odb/mysql/source.cxx')
-rw-r--r-- | odb/mysql/source.cxx | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/odb/mysql/source.cxx b/odb/mysql/source.cxx index 5dfcf2e..3959894 100644 --- a/odb/mysql/source.cxx +++ b/odb/mysql/source.cxx @@ -37,11 +37,45 @@ namespace mysql << "//" << endl << endl; + // insert_query + // + os << "const char* const " << traits << "::insert_query = " << endl + << "\"INSERT INTO\";" + << endl; + + // bind () + // + os << "void " << traits << "::" << endl + << "bind (MYSQL_BIND*, image_type&)" + << "{" + << "}"; + + // init (image, object) + // + os << "void " << traits << "::" << endl + << "init (image_type&, object_type&)" + << "{" + << "}"; + + // init (object, image) + // + os << "void " << traits << "::" << endl + << "init (object_type&, image_type&)" + << "{" + << "}"; + // persist () // os << "void " << traits << "::" << endl << "persist (database&, object_type& obj)" << "{" + << "using namespace mysql;" + << endl + << "connection& conn (mysql::transaction::current ().connection ());" + << "insert_statement<object_type>& st (" << endl + << "conn.statement_cache ().find<object_type> ().insert ());" + << "init (st.image (), obj);" + << "st.execute ();" << "}"; // store () @@ -93,6 +127,9 @@ namespace mysql ns_defines >> c; ctx.os << "#include <odb/mysql/database.hxx>" << endl + << "#include <odb/mysql/transaction.hxx>" << endl + << "#include <odb/mysql/connection.hxx>" << endl + << "#include <odb/mysql/statement.hxx>" << endl << "#include <odb/mysql/exceptions.hxx>" << endl << endl; |