summaryrefslogtreecommitdiff
path: root/odb/relational/common.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-07-10 15:17:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-07-10 15:17:16 +0200
commitb8554760aa3a5c5697c77d11e507a2bb46dbf8e4 (patch)
tree3f2bcb28a59eb0d4cce4586acec4a8c639cde7e6 /odb/relational/common.cxx
parent1b64460a2b2c5411b6052cd4c4d8e8b0d46a4086 (diff)
Add support for custom database type mapping
New pragma qualifier, map, and specifiers: as, to, from. New tests: <database>/custom.
Diffstat (limited to 'odb/relational/common.cxx')
-rw-r--r--odb/relational/common.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/odb/relational/common.cxx b/odb/relational/common.cxx
index 469eef1..1e1009d 100644
--- a/odb/relational/common.cxx
+++ b/odb/relational/common.cxx
@@ -350,8 +350,8 @@ namespace relational
void query_columns::
column_ctor (string const& type, string const& base)
{
- os << type << " (const char* t, const char* c)" << endl
- << " : " << base << " (t, c)"
+ os << type << " (const char* t, const char* c, const char* conv)" << endl
+ << " : " << base << " (t, c, conv)"
<< "{"
<< "}";
}
@@ -389,6 +389,9 @@ namespace relational
<< scope_ << "::" << endl
<< name << " (A::" << "table_name, " << strlit (quote_id (column));
+ string const& conv (convert_to_expr (column_type (), m));
+ os << ", " << (conv.empty () ? "0" : strlit (conv));
+
column_ctor_extra (m);
os << ");"