diff options
Diffstat (limited to 'odb/relational/pgsql/header.cxx')
-rw-r--r-- | odb/relational/pgsql/header.cxx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/odb/relational/pgsql/header.cxx b/odb/relational/pgsql/header.cxx index 4043809..474b69c 100644 --- a/odb/relational/pgsql/header.cxx +++ b/odb/relational/pgsql/header.cxx @@ -26,12 +26,17 @@ namespace relational if (abstract (c)) return; + column_count_type const& cc (column_count (c)); + // Statement names. // os << "static const char persist_statement_name[];" - << "static const char find_statement_name[];" - << "static const char update_statement_name[];" - << "static const char erase_statement_name[];"; + << "static const char find_statement_name[];"; + + if (cc.total != cc.id + cc.inverse + cc.readonly) + os << "static const char update_statement_name[];"; + + os << "static const char erase_statement_name[];"; // Query statement name. // @@ -44,11 +49,13 @@ namespace relational // Statement types. // os << "static const unsigned int persist_statement_types[];" - << "static const unsigned int find_statement_types[];" - << "static const unsigned int update_statement_types[];" - << "static const unsigned int erase_statement_types[];" - << endl; + << "static const unsigned int find_statement_types[];"; + + if (cc.total != cc.id + cc.inverse + cc.readonly) + os << "static const unsigned int update_statement_types[];"; + os << "static const unsigned int erase_statement_types[];" + << endl; } virtual void |