summaryrefslogtreecommitdiff
path: root/odb/relational/oracle/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-01-22 17:43:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-01-22 17:43:56 +0200
commit94d00afa2896a0a418da029aee1e5354c49759dd (patch)
tree42f2f82c33b6930e6153f0bdbb5cea4cda5ad073 /odb/relational/oracle/context.cxx
parent43539f96afd937bb8a5b73c98a755a9de93c5f49 (diff)
Pass precision and scale to Oracle query_param
Diffstat (limited to 'odb/relational/oracle/context.cxx')
-rw-r--r--odb/relational/oracle/context.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/odb/relational/oracle/context.cxx b/odb/relational/oracle/context.cxx
index 0f9bae1..d477a19 100644
--- a/odb/relational/oracle/context.cxx
+++ b/odb/relational/oracle/context.cxx
@@ -400,11 +400,13 @@ namespace relational
// However, this may change in future versions.
//
r.type = sql_type::VARCHAR2;
+ r.byte_semantics = true;
s = parse_prec;
}
else if (id == "NVARCHAR2")
{
r.type = sql_type::NVARCHAR2;
+ r.byte_semantics = false;
s = parse_prec;
}
else if (id == "VARYING")
@@ -412,11 +414,17 @@ namespace relational
// VARYING always appears at the end of an identifier.
//
if (prefix == "CHAR" || prefix == "CHARACTER")
+ {
r.type = sql_type::VARCHAR2;
+ r.byte_semantics = true;
+ }
else if (prefix == "NCHAR" ||
prefix == "NATIONAL CHAR" ||
prefix == "NATIONAL CHARACTER")
+ {
r.type = sql_type::NVARCHAR2;
+ r.byte_semantics = false;
+ }
s = parse_prec;
}
@@ -473,18 +481,18 @@ namespace relational
if (prefix == "CHAR" || prefix == "CHARACTER")
{
r.type = sql_type::CHAR;
+ r.byte_semantics = true;
r.prec = true;
r.prec_value = 1;
- r.byte_semantics = true;
}
else if (prefix == "NCHAR" ||
prefix == "NATIONAL CHAR" ||
prefix == "NATIONAL CHARACTER")
{
r.type = sql_type::NCHAR;
+ r.byte_semantics = false;
r.prec = true;
r.prec_value = 1;
- r.byte_semantics = false;
}
else if (prefix == "TIMESTAMP")
{
@@ -643,18 +651,18 @@ namespace relational
if (prefix == "CHAR" || prefix == "CHARACTER")
{
r.type = sql_type::CHAR;
+ r.byte_semantics = true;
r.prec = true;
r.prec_value = 1;
- r.byte_semantics = true;
}
else if (prefix == "NCHAR" ||
prefix == "NATIONAL CHAR" ||
prefix == "NATIONAL CHARACTER")
{
r.type = sql_type::NCHAR;
+ r.byte_semantics = false;
r.prec = true;
r.prec_value = 1;
- r.byte_semantics = false;
}
else if (prefix == "TIMESTAMP")
{