summaryrefslogtreecommitdiff
path: root/odb/relational/common.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-01-26 12:43:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-01-26 12:43:16 +0200
commitaf12ffe836de09ec84f666effa4df347eeb07a43 (patch)
treedc0aec9f8fee545c84be098414772cf2b277c30d /odb/relational/common.cxx
parentc1d2ec5bbd5969332f3278f39d2a7a8f0abc0493 (diff)
Implement support for database schema
New pragma qualifier: namespace. New pragma specifier: schema. The table specifier was extended to accept a schema prefix. New option: --default- schema. The common/schema test was extended to cover the new functionality.
Diffstat (limited to 'odb/relational/common.cxx')
-rw-r--r--odb/relational/common.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/odb/relational/common.cxx b/odb/relational/common.cxx
index 1ee8449..0c1ecc8 100644
--- a/odb/relational/common.cxx
+++ b/odb/relational/common.cxx
@@ -112,11 +112,11 @@ namespace relational
}
else
{
- // For now use column name as table alias. This will become problematic
- // when we add support for composite ids.
+ // For now use column name as table alias.
+ // @@ This will become problematic when we add support for composite ids.
//
os << "const char " << scope_ << "::" << name << "_alias_[] = " <<
- strlit (column) << ";"
+ strlit (quote_id (column)) << ";"
<< endl;
if (inv)
@@ -299,7 +299,8 @@ namespace relational
{
os << "template <const char* table>" << endl
<< "const typename " << scope_ << "::" << name << "_type_" << endl
- << scope_ << "::" << name << " (" << "table, " << strlit (column);
+ << scope_ << "::" << name << " (" << "table, " <<
+ strlit (quote_id (column));
column_ctor_extra (m);