aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/result.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-08-10 17:05:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-08-10 17:05:28 +0200
commit19d689b4757f4d52c60032076b2023fa6aa30837 (patch)
treeb28d4e1a01b87449e7436aadcc5a448c41bc5dec /odb/mysql/result.txx
parentb49d3e5e0e58e69b4fde856e37f73d101b5b2c0a (diff)
Add ability to load result into an existing object
Diffstat (limited to 'odb/mysql/result.txx')
-rw-r--r--odb/mysql/result.txx8
1 files changed, 8 insertions, 0 deletions
diff --git a/odb/mysql/result.txx b/odb/mysql/result.txx
index b85e2e0..39100ab 100644
--- a/odb/mysql/result.txx
+++ b/odb/mysql/result.txx
@@ -40,6 +40,14 @@ namespace odb
template <typename T>
void result_impl<T>::
+ current (T& x)
+ {
+ if (state_ == query_statement::success)
+ traits::init (x, statements_.image ());
+ }
+
+ template <typename T>
+ void result_impl<T>::
next ()
{
cur_ = pointer_type ();