aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-11-02 09:35:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-11-02 09:35:02 +0200
commit9eb1da8464db999d520b8739282cbe2b28da0432 (patch)
tree0b8c99a7db1ec0e510a7013f719605e3fa21ca19
parentcd4e72208fad964a22c99bb9fc15708a528a1e39 (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.
-rw-r--r--odb/mysql/object-result.hxx2
-rw-r--r--odb/mysql/object-result.txx2
2 files changed, 2 insertions, 2 deletions
diff --git a/odb/mysql/object-result.hxx b/odb/mysql/object-result.hxx
index d2c6ab0..30d0eee 100644
--- a/odb/mysql/object-result.hxx
+++ b/odb/mysql/object-result.hxx
@@ -42,7 +42,7 @@ namespace odb
object_statements<object_type>&);
virtual void
- load (object_type&);
+ load (object_type&, bool fetch);
virtual id_type
load_id ();
diff --git a/odb/mysql/object-result.txx b/odb/mysql/object-result.txx
index e8b3560..502cb8c 100644
--- a/odb/mysql/object-result.txx
+++ b/odb/mysql/object-result.txx
@@ -36,7 +36,7 @@ namespace odb
template <typename T>
void object_result_impl<T>::
- load (object_type& obj)
+ load (object_type& obj, bool)
{
if (count_ > statement_->fetched ())
fetch ();