diff options
-rw-r--r-- | odb/sqlite/database.hxx | 4 | ||||
-rw-r--r-- | odb/sqlite/database.ixx | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/odb/sqlite/database.hxx b/odb/sqlite/database.hxx index 0eef6d5..f3d8248 100644 --- a/odb/sqlite/database.hxx +++ b/odb/sqlite/database.hxx @@ -124,6 +124,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/sqlite/database.ixx b/odb/sqlite/database.ixx index d5918f0..5b21e36 100644 --- a/odb/sqlite/database.ixx +++ b/odb/sqlite/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_sqlite> (obj); + } + + template <typename T> + inline typename object_traits<T>::id_type database:: persist (T* p) { typedef typename object_traits<T>::pointer_type object_pointer; |