summaryrefslogtreecommitdiff
path: root/odb
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-10-20 20:41:30 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-10-21 11:47:15 +0200
commit97f3e64586a6758161763a33a03d5cc09171219f (patch)
treeb53abe0dbcf340393869ef315cb0e01de39a9545 /odb
parent8a1fc3adebbc0fe22edc8bb123327d6684e750ab (diff)
Implement Oracle identifier truncation to 30 characters
Diffstat (limited to 'odb')
-rw-r--r--odb/relational/oracle/context.cxx11
-rw-r--r--odb/relational/oracle/context.hxx4
2 files changed, 15 insertions, 0 deletions
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: