aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/database.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-08-14 15:16:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-08-14 15:16:09 +0200
commit075f64ca84e4e1be22bad30e4974e9b675d12ec8 (patch)
treeec157ade131adf217d9c2dcd47228bc8c7b53cb9 /odb/mysql/database.ixx
parent7f55357c16a981ae2d2d4b1ea2d1cfdcff1bdf74 (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/mysql/database.ixx')
-rw-r--r--odb/mysql/database.ixx14
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/mysql/database.ixx b/odb/mysql/database.ixx
index 5455293..475e7e1 100644
--- a/odb/mysql/database.ixx
+++ b/odb/mysql/database.ixx
@@ -108,6 +108,13 @@ namespace odb
}
template <typename T>
+ inline void database::
+ load (T& obj, section& s)
+ {
+ return load_<T, id_mysql> (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_mysql> (obj, s);
+ }
+
+ template <typename T>
+ inline void database::
erase (const typename object_traits<T>::id_type& id)
{
return erase_<T, id_mysql> (id);