diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-05-06 12:05:39 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-08-14 15:18:23 +0200 |
commit | 91830e3bd38a05c73d03a5dfb88997799d44274b (patch) | |
tree | 399f1fc61ce959ac63b8b7ebaf5e3c58f80d8a7d /odb/database.ixx | |
parent | 72b262ee4f375089256f6438152bd323df1ff5a3 (diff) |
Add support for object sections
Sections are an optimization mechanism that allows the partitioning of
data members of a persistent class into groups that can be separately
loaded and/or updated.
Diffstat (limited to 'odb/database.ixx')
-rw-r--r-- | odb/database.ixx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/database.ixx b/odb/database.ixx index b7c1917..066afd6 100644 --- a/odb/database.ixx +++ b/odb/database.ixx @@ -199,6 +199,13 @@ namespace odb } template <typename T> + inline void database:: + load (T& obj, section& s) + { + return load_<T, id_common> (obj, s); + } + + template <typename T> inline typename object_traits<T>::pointer_type database:: find (const typename object_traits<T>::id_type& id) { @@ -340,6 +347,13 @@ namespace odb template <typename T> inline void database:: + update (const T& obj, const section& s) + { + update_<T, id_common> (obj, s); + } + + template <typename T> + inline void database:: erase (const typename object_traits<T>::id_type& id) { return erase_<T, id_common> (id); |