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:19:13 +0200 |
commit | 0745f84e2d5c7133f6ee6608487089d69d7ad519 (patch) | |
tree | bcba1aee153c18ef58396c86632de35360fb5950 /odb/pgsql/database.ixx | |
parent | 79ccdd960976729e2d46e2d476f54b92c5348a5f (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/pgsql/database.ixx')
-rw-r--r-- | odb/pgsql/database.ixx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/pgsql/database.ixx b/odb/pgsql/database.ixx index afc3ce7..809e4d4 100644 --- a/odb/pgsql/database.ixx +++ b/odb/pgsql/database.ixx @@ -108,6 +108,13 @@ namespace odb } template <typename T> + inline void database:: + load (T& obj, section& s) + { + return load_<T, id_pgsql> (obj, s); + } + + template <typename T> inline typename object_traits<T>::pointer_type database:: find (const typename object_traits<T>::id_type& id) { @@ -249,6 +256,13 @@ namespace odb template <typename T> inline void database:: + update (const T& obj, const section& s) + { + update_<T, id_pgsql> (obj, s); + } + + template <typename T> + inline void database:: erase (const typename object_traits<T>::id_type& id) { return erase_<T, id_pgsql> (id); |