diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-21 08:16:49 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-21 08:16:49 +0200 |
commit | 77a945ec67dbf7ce2819704e80a83e5aae6bb446 (patch) | |
tree | f83183c545fac0a97ffe4648557b37c83b913724 /odb/mssql/database.hxx | |
parent | a4246c978c176f0a65ca3f1501821397d829e5aa (diff) |
Add support for stopping after a failed batch
Diffstat (limited to 'odb/mssql/database.hxx')
-rw-r--r-- | odb/mssql/database.hxx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/odb/mssql/database.hxx b/odb/mssql/database.hxx index 3fb0ec0..fc13974 100644 --- a/odb/mssql/database.hxx +++ b/odb/mssql/database.hxx @@ -179,6 +179,13 @@ namespace odb typename object_traits<T>::id_type persist (const typename object_traits<T>::pointer_type& obj_ptr); + // Bulk persist. Can be a range of references or pointers (including + // smart pointers) to objects. + // + template <typename I> + void + persist (I begin, I end, bool continue_failed = true); + // Load an object. Throw object_not_persistent if not found. // template <typename T> @@ -265,6 +272,13 @@ namespace odb void update (const typename object_traits<T>::pointer_type& obj_ptr); + // Bulk update. Can be a range of references or pointers (including + // smart pointers) to objects. + // + template <typename I> + void + update (I begin, I end, bool continue_failed = true); + // Update a section of an object. Throws the section_not_loaded // exception if the section is not loaded. Note also that this // function does not clear the changed flag if it is set. @@ -308,6 +322,19 @@ namespace odb void erase (const typename object_traits<T>::pointer_type& obj_ptr); + // Bulk erase. + // + template <typename T, typename I> + void + erase (I id_begin, I id_end, bool continue_failed = true); + + // Can be a range of references or pointers (including smart pointers) + // to objects. + // + template <typename I> + void + erase (I obj_begin, I obj_end, bool continue_failed = true); + // Erase multiple objects matching a query predicate. // template <typename T> |