diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-12-12 11:26:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-12-12 11:26:44 +0200 |
commit | a5f24411433aeb61ad015129354a664820affab0 (patch) | |
tree | 25fb5a97c0c070b78c9318f1da3dcbc484785918 /odb/relational/context.hxx | |
parent | 2ad2e5500dd075db421a516502c9e522fdc34ee0 (diff) |
Add support for SQL name transformations
Diffstat (limited to 'odb/relational/context.hxx')
-rw-r--r-- | odb/relational/context.hxx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/odb/relational/context.hxx b/odb/relational/context.hxx index 990e0aa..55c9a23 100644 --- a/odb/relational/context.hxx +++ b/odb/relational/context.hxx @@ -105,9 +105,9 @@ namespace relational // Quoted column and table names. // string - column_qname (semantics::data_member& m) const + column_qname (semantics::data_member& m, column_prefix const& cp) const { - return quote_id (column_name (m)); + return quote_id (column_name (m, cp)); } string @@ -119,9 +119,10 @@ namespace relational string column_qname (semantics::data_member& m, string const& key_prefix, - string const& default_name) const + string const& default_name, + column_prefix const& cp) const { - return quote_id (column_name (m, key_prefix, default_name)); + return quote_id (column_name (m, key_prefix, default_name, cp)); } string @@ -142,6 +143,13 @@ namespace relational return quote_id (table_name (m, p)); } + public: + string + index_name (qname const& table, string const& base); + + string + fkey_name (qname const& table, string const& base); + // Custom database type conversion. // public: @@ -261,6 +269,9 @@ namespace relational bool delay_freeing_statement_result; bool need_image_clone; + bool global_index; + bool global_fkey; + string const& bind_vector; string const& truncated_vector; }; |