aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-07-04 09:57:38 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-07-05 14:43:38 +0200
commit98bfe6e9473e16cc10186dc0b58c88316e54ccb0 (patch)
tree9c3fbe5907806955c65322689b3225d8442b3c66
parentd411d1ce304500b0204e0403b412271099fd5a7f (diff)
Implement PostgreSQL query_statement_ctor and post_query_ hooks
-rw-r--r--odb/relational/pgsql/source.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/odb/relational/pgsql/source.cxx b/odb/relational/pgsql/source.cxx
index 78b5405..f123591 100644
--- a/odb/relational/pgsql/source.cxx
+++ b/odb/relational/pgsql/source.cxx
@@ -927,6 +927,29 @@ namespace relational
<< "query_statement_name = " << strlit (fn + "_query") << ";"
<< endl;
}
+
+ virtual void
+ query_statement_ctor (type& c)
+ {
+ string const& type (c.fq_name ());
+ string traits ("access::object_traits< " + type + " >");
+
+ os << "select_statement (" << endl
+ << "sts.connection ()," << endl
+ << "query_statement_name," << endl
+ << "query_clause + q.clause ()," << endl
+ << "q.parameter_types ()," << endl
+ << "q.parameter_count ()," << endl
+ << "q.parameters_binding ()," << endl
+ << "q.native_parameters_binding ()," << endl
+ << "imb)";
+ }
+
+ virtual void
+ post_query_ (type&)
+ {
+ os << "st->deallocate ();";
+ }
};
entry<class_> class_entry_;