aboutsummaryrefslogtreecommitdiff
path: root/odb/database.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/database.hxx')
-rw-r--r--odb/database.hxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/odb/database.hxx b/odb/database.hxx
index 1f56b7f..3ddf914 100644
--- a/odb/database.hxx
+++ b/odb/database.hxx
@@ -33,6 +33,7 @@
#include <odb/details/mutex.hxx>
#include <odb/details/c-string.hxx>
#include <odb/details/function-wrapper.hxx>
+#include <odb/details/meta/answer.hxx>
namespace odb
{
@@ -77,6 +78,12 @@ namespace odb
typename object_traits<T>::id_type
persist (const typename object_traits<T>::pointer_type& obj_ptr);
+ // Bulk persist.
+ //
+ template <typename I>
+ void
+ persist (I begin, I end);
+
// Load an object. Throw object_not_persistent if not found.
//
template <typename T>
@@ -489,6 +496,18 @@ namespace odb
typename object_traits<T>::id_type
persist_ (const typename object_traits<T>::pointer_type&);
+ template <typename I, database_id DB>
+ void
+ persist_ (I, I);
+
+ template <typename I, typename T, database_id DB>
+ void
+ persist_ (I, I, details::meta::no ptr);
+
+ template <typename I, typename T, database_id DB>
+ void
+ persist_ (I, I, details::meta::yes ptr);
+
template <typename T, database_id DB>
typename object_traits<T>::pointer_type
load_ (const typename object_traits<T>::id_type&);