From a39542d31d94f792629e38b4b68e23e7aa457b62 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 21 Nov 2014 07:28:16 +0200 Subject: Add database-specific persist(const T&) --- odb/mysql/database.hxx | 4 ++++ odb/mysql/database.ixx | 7 +++++++ 2 files changed, 11 insertions(+) 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 object_traits::id_type + persist (const T& object); + + template + typename object_traits::id_type persist (T* obj_ptr); template 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 inline typename object_traits::id_type database:: + persist (const T& obj) + { + return persist_ (obj); + } + + template + inline typename object_traits::id_type database:: persist (T* p) { typedef typename object_traits::pointer_type object_pointer; -- cgit v1.1