diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-08-14 09:37:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-25 06:47:21 +0200 |
commit | 55b36b8297ef9aac9e4ccc7b98f8649534ee0ac1 (patch) | |
tree | e9f0d22285d7fc9ad814b75eac9d587c6d630995 /odb/relational/header.cxx | |
parent | 19ba3497c0788f02fc417f441d87c96ce23f9446 (diff) |
Implement bulk database operation support for Oracle and SQL Server
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 |