diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-11-26 15:48:28 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-11-26 15:48:28 +0200 |
commit | 61fc247f34255796f5535b52626074b4f92b6bb4 (patch) | |
tree | 347d00cedcee85f7d75a5976a210ab07ef33c7be /odb/mysql/result.hxx | |
parent | ba8430c002627705d559b5dd9d78ae7611476520 (diff) |
Postpone fetching of the data for cached results
This way if an object of the same type is loaded in between iteration, the fetched
image won't be messed up.
Diffstat (limited to 'odb/mysql/result.hxx')
-rw-r--r-- | odb/mysql/result.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/odb/mysql/result.hxx b/odb/mysql/result.hxx index ec232a5..5c1e185 100644 --- a/odb/mysql/result.hxx +++ b/odb/mysql/result.hxx @@ -8,6 +8,8 @@ #include <odb/pre.hxx> +#include <cstddef> // std::size_t + #include <odb/result.hxx> #include <odb/mysql/version.hxx> @@ -56,8 +58,13 @@ namespace odb using odb::result_impl<T>::current; private: + void + fetch (); + + private: details::shared_ptr<select_statement> statement_; object_statements<object_type>& statements_; + std::size_t count_; }; } } |