aboutsummaryrefslogtreecommitdiff
path: root/odb/prepared-query.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/prepared-query.hxx')
-rw-r--r--odb/prepared-query.hxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/odb/prepared-query.hxx b/odb/prepared-query.hxx
index b321564..5fc4783 100644
--- a/odb/prepared-query.hxx
+++ b/odb/prepared-query.hxx
@@ -86,6 +86,29 @@ namespace odb
return r;
}
+ typename object_traits<T>::pointer_type
+ execute_one ()
+ {
+ return execute (false).one ();
+ }
+
+ bool
+ execute_one (T& object)
+ {
+ return execute (false).one (object);
+ }
+
+ T
+ execute_value ()
+ {
+ // Compiler error pointing here? The object must be default-
+ // constructible in order to use the return-by-value API.
+ //
+ T o;
+ execute (false).value (o);
+ return o;
+ }
+
const char*
name () const
{