diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-21 07:28:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-21 07:28:16 +0200 |
commit | a4246c978c176f0a65ca3f1501821397d829e5aa (patch) | |
tree | bba4080a6955d8169087dbfe2de660182e35c500 | |
parent | 13d8a137617ac9b23554594a80b97a35b65920b1 (diff) |
Add database-specific persist(const T&)
-rw-r--r-- | odb/mssql/database.hxx | 4 | ||||
-rw-r--r-- | odb/mssql/database.ixx | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/odb/mssql/database.hxx b/odb/mssql/database.hxx index 4ac85d2..3fb0ec0 100644 --- a/odb/mssql/database.hxx +++ b/odb/mssql/database.hxx @@ -153,6 +153,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/mssql/database.ixx b/odb/mssql/database.ixx index 93919f6..705edb5 100644 --- a/odb/mssql/database.ixx +++ b/odb/mssql/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_mssql> (obj); + } + + template <typename T> + inline typename object_traits<T>::id_type database:: persist (T* p) { typedef typename object_traits<T>::pointer_type object_pointer; |