aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-11-21 07:28:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-11-21 07:28:16 +0200
commita39542d31d94f792629e38b4b68e23e7aa457b62 (patch)
tree3d3d0803f4ae707cf8926ce134ace4a35c08a8f5
parentf8fc4f6ab094ba8a2060ce3c297920d89c41ffd5 (diff)
Add database-specific persist(const T&)bulk
-rw-r--r--odb/mysql/database.hxx4
-rw-r--r--odb/mysql/database.ixx7
2 files changed, 11 insertions, 0 deletions
diff --git a/odb/mysql/database.hxx b/odb/mysql/database.hxx
index 8d11e72..9192138 100644
--- a/odb/mysql/database.hxx
+++ b/odb/mysql/database.hxx
@@ -180,6 +180,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>
diff --git a/odb/mysql/database.ixx b/odb/mysql/database.ixx
index 09fc641..68aecec 100644
--- a/odb/mysql/database.ixx
+++ b/odb/mysql/database.ixx
@@ -27,6 +27,13 @@ namespace odb
template <typename T>
inline typename object_traits<T>::id_type database::
+ persist (const T& obj)
+ {
+ return persist_<const T, id_mysql> (obj);
+ }
+
+ template <typename T>
+ inline typename object_traits<T>::id_type database::
persist (T* p)
{
typedef typename object_traits<T>::pointer_type object_pointer;