diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-02 09:35:02 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-02 09:35:02 +0200 |
commit | b9eff63278d5bb8d59a40f7b837cff4843eaae05 (patch) | |
tree | 279d329136a2f9d2afcf9d645e0e7e98f6995ded /odb/object-result.txx | |
parent | 37e1d992d234363ff9aef45555678b5ee7203a99 (diff) |
Optimize load_id(), load() sequence for SQLite and PostgreSQL
In these databases both of these functions load the data into the
object image. If there is no chance of image overwrite between
these calls, then we don't need to load the image the second time.
Diffstat (limited to 'odb/object-result.txx')
-rw-r--r-- | odb/object-result.txx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/odb/object-result.txx b/odb/object-result.txx index 843ec59..c84abe8 100644 --- a/odb/object-result.txx +++ b/odb/object-result.txx @@ -52,7 +52,7 @@ namespace odb object_type& obj (pointer_traits::get_ref (p)); current (p); - load (obj); + load (obj, false); ig.release (); } } @@ -106,7 +106,7 @@ namespace odb typename reference_cache_traits<object_type>::insert_guard ig ( reference_cache_traits<object_type>::insert ( res_->database (), res_->load_id (), obj)); - res_->load (obj); + res_->load (obj, false); ig.release (); } } |