mirror of https://github.com/apache/openjpa.git
Fixed concatinate function to cast both sides as a VARCHAR, since DB2 and Derby disallow parameters on both sides of the function.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@497190 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c7128669c7
commit
ef67680a55
|
@ -31,9 +31,13 @@ public abstract class AbstractDB2Dictionary
|
||||||
longVarbinaryTypeName = "BLOB";
|
longVarbinaryTypeName = "BLOB";
|
||||||
varbinaryTypeName = "BLOB";
|
varbinaryTypeName = "BLOB";
|
||||||
|
|
||||||
|
// DB2-based databases have restrictions on having uncast parameters
|
||||||
|
// in string functions
|
||||||
toUpperCaseFunction = "UPPER(CAST({0} AS VARCHAR(1000)))";
|
toUpperCaseFunction = "UPPER(CAST({0} AS VARCHAR(1000)))";
|
||||||
toLowerCaseFunction = "LOWER(CAST({0} AS VARCHAR(1000)))";
|
toLowerCaseFunction = "LOWER(CAST({0} AS VARCHAR(1000)))";
|
||||||
stringLengthFunction = "LENGTH(CAST({0} AS VARCHAR(1000)))";
|
stringLengthFunction = "LENGTH(CAST({0} AS VARCHAR(1000)))";
|
||||||
|
concatenateFunction = "(CAST({0} AS VARCHAR(1000)))||"
|
||||||
|
+ "(CAST({1} AS VARCHAR(1000)))";
|
||||||
|
|
||||||
trimLeadingFunction = "LTRIM({0})";
|
trimLeadingFunction = "LTRIM({0})";
|
||||||
trimTrailingFunction = "RTRIM({0})";
|
trimTrailingFunction = "RTRIM({0})";
|
||||||
|
|
Loading…
Reference in New Issue