diff options
Diffstat (limited to 'odb/mssql/database.hxx')
-rw-r--r-- | odb/mssql/database.hxx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/odb/mssql/database.hxx b/odb/mssql/database.hxx index 4ac85d2..fc13974 100644 --- a/odb/mssql/database.hxx +++ b/odb/mssql/database.hxx @@ -153,6 +153,10 @@ namespace odb template <typename T> typename object_traits<T>::id_type + persist (const T& object); + + template <typename T> + typename object_traits<T>::id_type persist (T* obj_ptr); template <typename T, template <typename> class P> @@ -175,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> @@ -261,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. @@ -304,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> |