aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/result.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-07-05 14:56:58 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-07-05 14:56:58 +0200
commit0eb2f9a50cd70599757bde6056d8981d7f892c0d (patch)
treec0fd7705b5754abcde9ae5cf6e06a53d830cad17 /odb/pgsql/result.txx
parent1d3edf0de34c311014fd222a737e96c9f1d5b83a (diff)
Support for callbacks in PG runtime
Diffstat (limited to 'odb/pgsql/result.txx')
-rw-r--r--odb/pgsql/result.txx9
1 files changed, 7 insertions, 2 deletions
diff --git a/odb/pgsql/result.txx b/odb/pgsql/result.txx
index d0afe1c..edea595 100644
--- a/odb/pgsql/result.txx
+++ b/odb/pgsql/result.txx
@@ -3,6 +3,7 @@
// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
+#include <odb/callback.hxx>
#include <odb/exceptions.hxx>
namespace odb
@@ -37,8 +38,11 @@ namespace odb
assert (!statements_.locked ());
typename object_statements<object_type>::auto_lock l (statements_);
+ odb::database& db (this->database ());
+ object_traits::callback (db, obj, callback_event::pre_load);
+
typename object_traits::image_type& i (statements_.image ());
- object_traits::init (obj, i, this->database ());
+ object_traits::init (obj, i, db);
// Initialize the id image and binding and load the rest of the object
// (containers, etc).
@@ -55,8 +59,9 @@ namespace odb
}
object_traits::load_ (statements_, obj);
-
statements_.load_delayed ();
+ object_traits::callback (db, obj, callback_event::post_load);
+
l.unlock ();
}