aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/database.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/pgsql/database.hxx')
-rw-r--r--odb/pgsql/database.hxx31
1 files changed, 30 insertions, 1 deletions
diff --git a/odb/pgsql/database.hxx b/odb/pgsql/database.hxx
index 2e5f158..950cad1 100644
--- a/odb/pgsql/database.hxx
+++ b/odb/pgsql/database.hxx
@@ -1,5 +1,4 @@
// file : odb/pgsql/database.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_PGSQL_DATABASE_HXX
@@ -80,6 +79,9 @@ namespace odb
// Move-constructible but not move-assignable.
//
+ // Note: noexcept is not specified since odb::database(odb::database&&)
+ // can throw.
+ //
#ifdef ODB_CXX11
database (database&&);
#endif
@@ -125,6 +127,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>
@@ -211,6 +220,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.
@@ -254,6 +270,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>