summaryrefslogtreecommitdiff
path: root/odb/relational/pgsql/header.cxx
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-07-05 12:46:24 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-07-05 14:43:38 +0200
commitc8d66805dbd6cf6b2c780675318b7324799ea657 (patch)
tree75e6625d8e50e6cd0f3acb76fae62d6b7203292f /odb/relational/pgsql/header.cxx
parent87abcad59a90a9a9ce8809cdf51bea7fc5901baf (diff)
Only generate query statement names if queries are being generated
Diffstat (limited to 'odb/relational/pgsql/header.cxx')
-rw-r--r--odb/relational/pgsql/header.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/odb/relational/pgsql/header.cxx b/odb/relational/pgsql/header.cxx
index 85b9030..e8207aa 100644
--- a/odb/relational/pgsql/header.cxx
+++ b/odb/relational/pgsql/header.cxx
@@ -31,8 +31,14 @@ namespace relational
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;
+ << "static const char* const erase_statement_name;";
+
+ // Query statement name.
+ //
+ if (options.generate_query ())
+ os << "static const char* const query_statement_name;";
+
+ os << endl;
// Statement types.
//
@@ -42,10 +48,6 @@ namespace relational
<< "static const unsigned int erase_statement_types[];"
<< endl;
- // Query statement name.
- //
- os << "static const char* const query_statement_name;"
- << endl;
}
};
entry<class_> class_entry_;