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 | 88f3f0282bad25c962783defa1e34dcbec60a07c (patch) | |
tree | 533b7f48765dc0502f60df58137e8c9364a7cfc9 /odb/mssql/database.hxx | |
parent | fe9276a017e09b1504a3b09002cefae337bd8354 (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/mssql/database.hxx')
-rw-r--r-- | odb/mssql/database.hxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/mssql/database.hxx b/odb/mssql/database.hxx index 47fe5aa..b949892 100644 --- a/odb/mssql/database.hxx +++ b/odb/mssql/database.hxx @@ -185,6 +185,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> @@ -255,6 +261,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. // |