summaryrefslogtreecommitdiff
path: root/odb/relational/pgsql/header.cxx
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-06-24 12:45:56 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-07-05 14:43:38 +0200
commit37ea83658d5d0879185441802e1a609fda2c22b8 (patch)
treea168b2c96ecaccc21bd5e58d429ab0032e05a8c8 /odb/relational/pgsql/header.cxx
parentb4e8ee9b9fb261821e4c85ca5a0bb32991a2f3f8 (diff)
Implement PostgreSQL statement name and types array code generation
Diffstat (limited to 'odb/relational/pgsql/header.cxx')
-rw-r--r--odb/relational/pgsql/header.cxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/odb/relational/pgsql/header.cxx b/odb/relational/pgsql/header.cxx
index 1915d75..172bf03 100644
--- a/odb/relational/pgsql/header.cxx
+++ b/odb/relational/pgsql/header.cxx
@@ -16,6 +16,35 @@ namespace relational
{
namespace relational = relational::header;
+ struct class_: relational::class_
+ {
+ class_ (base const& x): base (x) {}
+
+ virtual void
+ object_public_extra_post (type& t)
+ {
+ if (!abstract (t))
+ {
+ // Statement names.
+ //
+ os << "static const char* const persist_statement_name;"
+ << "static const char* const find_statement_name;"
+ << "static const char* const update_statement_name;"
+ << "static const char* const erase_statement_name;"
+ << endl;
+
+ // Statement oids.
+ //
+ os << "static const Oid persist_statement_types[];"
+ << "static const Oid find_statement_types[];"
+ << "static const Oid update_statement_types[];"
+ << "static const Oid erase_statement_types[];"
+ << endl;
+ }
+ }
+ };
+ entry<class_> class_entry_;
+
struct image_member: relational::image_member, member_base
{
image_member (base const& x)