aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-07-04 09:56:14 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-07-05 14:43:38 +0200
commitd411d1ce304500b0204e0403b412271099fd5a7f (patch)
treef7a00762b68258ecc4239345d5582d30c32bb4b5
parent2fa77da0e9f4fbb6cb8948108f2f5e510b2c5206 (diff)
Generate PostgreSQL query statement name
-rw-r--r--odb/relational/pgsql/header.cxx5
-rw-r--r--odb/relational/pgsql/source.cxx8
2 files changed, 13 insertions, 0 deletions
diff --git a/odb/relational/pgsql/header.cxx b/odb/relational/pgsql/header.cxx
index 10c910b..85b9030 100644
--- a/odb/relational/pgsql/header.cxx
+++ b/odb/relational/pgsql/header.cxx
@@ -41,6 +41,11 @@ namespace relational
<< "static const unsigned int update_statement_types[];"
<< "static const unsigned int erase_statement_types[];"
<< endl;
+
+ // Query statement name.
+ //
+ os << "static const char* const query_statement_name;"
+ << endl;
}
};
entry<class_> class_entry_;
diff --git a/odb/relational/pgsql/source.cxx b/odb/relational/pgsql/source.cxx
index 29dccfc..78b5405 100644
--- a/odb/relational/pgsql/source.cxx
+++ b/odb/relational/pgsql/source.cxx
@@ -863,6 +863,8 @@ namespace relational
<< "erase_statement_name = " << strlit (fn + "_erase") << ";"
<< endl;
+ // Statement types.
+ //
string oid_decl ("const unsigned int " + traits);
semantics::data_member* id_m (id_member (t));
@@ -918,6 +920,12 @@ namespace relational
os << "};";
}
+
+ // Query statement name.
+ //
+ os << name_decl << endl
+ << "query_statement_name = " << strlit (fn + "_query") << ";"
+ << endl;
}
};
entry<class_> class_entry_;