diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-01-05 13:50:34 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-01-05 13:50:34 +0200 |
commit | d33b95fff7f790d669c5798fdab913d38fc4ae79 (patch) | |
tree | e74894a0de77c08af673e1356915b29a2b7b1a92 /odb/mysql/header.cxx | |
parent | 320ca6d1a967621ac319922d1a4dfd17f8a03d60 (diff) |
Factor out id initialization and container loading into separate functions
Diffstat (limited to 'odb/mysql/header.cxx')
-rw-r--r-- | odb/mysql/header.cxx | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/odb/mysql/header.cxx b/odb/mysql/header.cxx index cd9eeec..12f3e4d 100644 --- a/odb/mysql/header.cxx +++ b/odb/mysql/header.cxx @@ -857,6 +857,12 @@ namespace mysql << "init (object_type&, const image_type&, database&);" << endl; + // init (id_image, id) + // + os << "static void" << endl + << "init (id_image_type&, const id_type&);" + << endl; + // persist () // os << "static void" << endl @@ -897,17 +903,28 @@ namespace mysql // Implementation details. // - os << "public:" << endl - << "static bool" << endl - << "find_ (mysql::object_statements<object_type>&, const id_type&);" + os << "public:" << endl; + + // Load the object image. + // + os << "static bool" << endl + << "find_ (mysql::object_statements< object_type >&, const id_type&);" + << endl; + + // Load the rest of the object (containers, etc). Expects the id + // image in the object statements to be initialized to the object + // id. + // + os << "static void" << endl + << "load_ (mysql::object_statements< object_type >&, object_type&);" << endl; if (options.generate_query ()) os << "static void" << endl << "query_ (database&," << endl << "const query_type&," << endl - << "mysql::object_statements<object_type>&," << endl - << "details::shared_ptr<mysql::select_statement>&);" + << "mysql::object_statements< object_type >&," << endl + << "details::shared_ptr< mysql::select_statement >&);" << endl; os << "};"; |