aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/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
commit534da0d899b11f6ca1fac161ea8901a62e5c07dc (patch)
tree5f8b002659f3d428bc14fc058557200870c3454c /odb/sqlite/database.ixx
parent3b683eaa935356ac960fca68c7173e1c9b1b3c1e (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/sqlite/database.ixx')
-rw-r--r--odb/sqlite/database.ixx14
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/sqlite/database.ixx b/odb/sqlite/database.ixx
index fd2063e..c2fd1a5 100644
--- a/odb/sqlite/database.ixx
+++ b/odb/sqlite/database.ixx
@@ -108,6 +108,13 @@ namespace odb
}
template <typename T>
+ inline void database::
+ load (T& obj, section& s)
+ {
+ return load_<T, id_sqlite> (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_sqlite> (obj, s);
+ }
+
+ template <typename T>
+ inline void database::
erase (const typename object_traits<T>::id_type& id)
{
return erase_<T, id_sqlite> (id);