From 4a50c5a7e9976587569276c768f85ad481694e70 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 22 Nov 2010 12:12:57 +0200 Subject: Support for session and const objects in generated code --- odb/mysql/header.cxx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'odb/mysql/header.cxx') diff --git a/odb/mysql/header.cxx b/odb/mysql/header.cxx index bedf2c9..1dc080a 100644 --- a/odb/mysql/header.cxx +++ b/odb/mysql/header.cxx @@ -787,6 +787,11 @@ namespace mysql << "id (const object_type&);" << endl; + if (options.generate_query ()) + os << "static id_type" << endl + << "id (const image_type&);" + << endl; + // grow () // os << "static void" << endl @@ -850,7 +855,8 @@ namespace mysql // query () // if (options.generate_query ()) - os << "static result" << endl + os << "template" << endl + << "static result" << endl << "query (database&, const query_type&);" << endl; @@ -858,7 +864,16 @@ namespace mysql // os << "private:" << endl << "static bool" << endl - << "find (mysql::object_statements&, const id_type&);"; + << "find_ (mysql::object_statements&, const id_type&);" + << endl; + + if (options.generate_query ()) + os << "static void" << endl + << "query_ (database&," << endl + << "const query_type&," << endl + << "mysql::object_statements&," << endl + << "details::shared_ptr&);" + << endl; os << "};"; } -- cgit v1.1