From a5f24411433aeb61ad015129354a664820affab0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 12 Dec 2012 11:26:44 +0200 Subject: Add support for SQL name transformations --- odb/relational/oracle/context.cxx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'odb/relational/oracle/context.cxx') diff --git a/odb/relational/oracle/context.cxx b/odb/relational/oracle/context.cxx index 4ba8659..df62ce8 100644 --- a/odb/relational/oracle/context.cxx +++ b/odb/relational/oracle/context.cxx @@ -85,6 +85,8 @@ namespace relational insert_send_auto_id = false; delay_freeing_statement_result = false; need_image_clone = true; + global_index = true; + global_fkey = true; data_->bind_vector_ = "oracle::bind*"; // Populate the C++ type to DB type map. @@ -168,6 +170,23 @@ namespace relational s == "long long unsigned int"; } + qname context:: + sequence_name (qname const& table) + { + string n; + + if (options.sequence_suffix ().count (db) != 0) + n = table.uname () + options.sequence_suffix ()[db]; + else + n = compose_name (table.uname (), "seq"); + + n = transform_name (n, sql_name_sequence); + + qname r (table.qualifier ()); + r.append (n); + return r; + } + // // SQL type parsing. // -- cgit v1.1