From 97f3e64586a6758161763a33a03d5cc09171219f Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Thu, 20 Oct 2011 20:41:30 +0200 Subject: Implement Oracle identifier truncation to 30 characters --- odb/relational/oracle/context.cxx | 11 +++++++++++ odb/relational/oracle/context.hxx | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/odb/relational/oracle/context.cxx b/odb/relational/oracle/context.cxx index 0128c94..236c725 100644 --- a/odb/relational/oracle/context.cxx +++ b/odb/relational/oracle/context.cxx @@ -100,6 +100,17 @@ namespace relational } string context:: + quote_id_impl (string const& id) const + { + string r; + r.reserve (32); + r += '"'; + r.append (id, 0, 30); + r += '"'; + return r; + } + + string context:: database_type_impl (semantics::type& t, semantics::names* hint, bool id) { string r (base_context::database_type_impl (t, hint, id)); diff --git a/odb/relational/oracle/context.hxx b/odb/relational/oracle/context.hxx index b884c41..d334f56 100644 --- a/odb/relational/oracle/context.hxx +++ b/odb/relational/oracle/context.hxx @@ -79,6 +79,10 @@ namespace relational protected: virtual string + quote_id_impl (string const&) const; + + protected: + virtual string database_type_impl (semantics::type&, semantics::names*, bool); public: -- cgit v1.1