diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-19 11:51:17 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-19 11:51:17 +0200 |
commit | e85b07722107d00e4a3182ff4d33274a617bb55a (patch) | |
tree | df3e58ea27935b29813f18b976b05a4c095c73bb /odb/relational/header.cxx | |
parent | 4bf55482207ee5807907833829dc30af2d18770b (diff) |
Implement bulk API code generation
Diffstat (limited to 'odb/relational/header.cxx')
-rw-r--r-- | odb/relational/header.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/odb/relational/header.cxx b/odb/relational/header.cxx index 41fdd26..6584b8e 100644 --- a/odb/relational/header.cxx +++ b/odb/relational/header.cxx @@ -494,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) @@ -542,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 () @@ -564,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 |