diff options
Diffstat (limited to 'odb/relational/header.cxx')
-rw-r--r-- | odb/relational/header.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/odb/relational/header.cxx b/odb/relational/header.cxx index 392d5f1..e8cba05 100644 --- a/odb/relational/header.cxx +++ b/odb/relational/header.cxx @@ -208,6 +208,11 @@ traverse_object (type& c) if (!poly_derived && id != 0) { + if (auto_id) + os << "static id_type" << endl + << "id (const id_image_type&);" + << endl; + if (options.generate_query ()) os << "static id_type" << endl << "id (const image_type&);" @@ -489,6 +494,12 @@ traverse_object (type& c) os << ");" << endl; + if (c.count ("bulk-persist")) + os << "static void" << endl + << "persist (database&, " << (auto_id ? "" : "const ") << + "object_type**, std::size_t, multiple_exceptions&);" + << endl; + if (id != 0) { // find (id) @@ -537,6 +548,12 @@ traverse_object (type& c) os << ");" << endl; + + if (c.count ("bulk-update")) + os << "static void" << endl + << "update (database&, const object_type**, std::size_t, " << + "multiple_exceptions&);" + << endl; } // erase () @@ -559,6 +576,19 @@ traverse_object (type& c) os << ");" << endl; + if (c.count ("bulk-erase")) + { + os << "static std::size_t" << endl + << "erase (database&, const id_type**, std::size_t, " << + "multiple_exceptions&);" + << endl; + + os << "static void" << endl + << "erase (database&, const object_type**, std::size_t, " << + "multiple_exceptions&);" + << endl; + } + // Sections. // // We treat all polymorphic sections as (potentially) having something |