From 9eb1da8464db999d520b8739282cbe2b28da0432 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 Nov 2011 09:35:02 +0200 Subject: 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. --- odb/mysql/object-result.hxx | 2 +- odb/mysql/object-result.txx | 2 +- 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&); 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 void object_result_impl:: - load (object_type& obj) + load (object_type& obj, bool) { if (count_ > statement_->fetched ()) fetch (); -- cgit v1.1