diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-08-14 15:16:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-08-14 15:16:09 +0200 |
commit | 1d287936950aa96a7b4a12b0d05633f257ab2c90 (patch) | |
tree | 08bd263cffb771dedcb016b5c6aa2ac7d5ea1471 /odb/oracle/database.hxx | |
parent | a786d2278d538cf8d2e7f91f7c55b3c6e091b015 (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/oracle/database.hxx')
-rw-r--r-- | odb/oracle/database.hxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/oracle/database.hxx b/odb/oracle/database.hxx index c29453b..3fe5de2 100644 --- a/odb/oracle/database.hxx +++ b/odb/oracle/database.hxx @@ -127,6 +127,12 @@ namespace odb void load (const typename object_traits<T>::id_type& id, T& object); + // Load (or reload, if it is already loaded) a section of an object. + // + template <typename T> + void + load (T& object, section&); + // Reload an object. // template <typename T> @@ -197,6 +203,14 @@ namespace odb void update (const typename object_traits<T>::pointer_type& obj_ptr); + // Update a section of an object. Throws the section_not_loaded + // exception if the section is not loaded. Note also that this + // function does not clear the changed flag if it is set. + // + template <typename T> + void + update (const T& object, const section&); + // Make the object transient. Throw object_not_persistent if not // found. // |