diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-08-14 09:37:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-11 10:27:11 +0200 |
commit | ded152cfb675537ab4ce24f50d0e95cec5b83b18 (patch) | |
tree | c5571f283fa6c0a5735ea4716b0592d9d3b8169d /odb/database.hxx | |
parent | 6375147d5ae76a84dd64f1996cb0d9d501839db6 (diff) |
Draft implementation for INSERT
Diffstat (limited to 'odb/database.hxx')
-rw-r--r-- | odb/database.hxx | 19 |
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&); |