From a7eb0390b8baf5228ef0a615c657813ff86e60de 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/oracle/database.hxx | 4 ++++ odb/oracle/database.ixx | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/odb/oracle/database.hxx b/odb/oracle/database.hxx index d40611f..a7df050 100644 --- a/odb/oracle/database.hxx +++ b/odb/oracle/database.hxx @@ -95,6 +95,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/oracle/database.ixx b/odb/oracle/database.ixx index d3b56ae..ff2afea 100644 --- a/odb/oracle/database.ixx +++ b/odb/oracle/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