Kaydet (Commit) ee12e843 authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Lionel Elie Mamane

fdo#84073: change ODBC/JDBC escapes to lowercase

Change-Id: I19ce3acb9575fbef8273bbd84cb4dc322e101ac8
üst b5167e18
...@@ -136,7 +136,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b ...@@ -136,7 +136,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b
if ( bOk ) if ( bOk )
{ {
if (bQuote) if (bQuote)
aRet.appendAscii("{TS '"); aRet.appendAscii("{ts '");
aRet.append(DBTypeConversion::toDateTimeString(aDateTime)); aRet.append(DBTypeConversion::toDateTimeString(aDateTime));
if (bQuote) if (bQuote)
aRet.appendAscii("'}"); aRet.appendAscii("'}");
...@@ -166,7 +166,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b ...@@ -166,7 +166,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b
bOk = _rVal >>= aDate; bOk = _rVal >>= aDate;
OSL_VERIFY_RES( bOk, "DBTypeConversion::toSQLString: _rVal is not date!"); OSL_VERIFY_RES( bOk, "DBTypeConversion::toSQLString: _rVal is not date!");
if (bQuote) if (bQuote)
aRet.appendAscii("{D '"); aRet.appendAscii("{d '");
aRet.append(DBTypeConversion::toDateString(aDate)); aRet.append(DBTypeConversion::toDateString(aDate));
if (bQuote) if (bQuote)
aRet.appendAscii("'}"); aRet.appendAscii("'}");
...@@ -193,7 +193,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b ...@@ -193,7 +193,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b
bOk = _rVal >>= aTime; bOk = _rVal >>= aTime;
OSL_VERIFY_RES( bOk,"DBTypeConversion::toSQLString: _rVal is not time!"); OSL_VERIFY_RES( bOk,"DBTypeConversion::toSQLString: _rVal is not time!");
if (bQuote) if (bQuote)
aRet.appendAscii("{T '"); aRet.appendAscii("{t '");
aRet.append(DBTypeConversion::toTimeString(aTime)); aRet.append(DBTypeConversion::toTimeString(aTime));
if (bQuote) if (bQuote)
aRet.appendAscii("'}"); aRet.appendAscii("'}");
......
...@@ -4660,6 +4660,14 @@ OString OSQLParser::TokenIDToStr(sal_uInt32 nTokenID, const IParseContext* pCont ...@@ -4660,6 +4660,14 @@ OString OSQLParser::TokenIDToStr(sal_uInt32 nTokenID, const IParseContext* pCont
aStr = yytname[YYTRANSLATE(nTokenID)]; aStr = yytname[YYTRANSLATE(nTokenID)];
if(aStr.startsWith("SQL_TOKEN_")) if(aStr.startsWith("SQL_TOKEN_"))
aStr = aStr.copy(10); aStr = aStr.copy(10);
switch( nTokenID )
{
case SQL_TOKEN_OJ:
case SQL_TOKEN_TS:
case SQL_TOKEN_T:
case SQL_TOKEN_D:
aStr = aStr.toAsciiLowerCase();
}
} }
return aStr; return aStr;
} }
......
...@@ -1074,7 +1074,7 @@ namespace ...@@ -1074,7 +1074,7 @@ namespace
{ {
// create outer join // create outer join
if ( bUseEscape ) if ( bUseEscape )
aStr += "{ OJ "; aStr += "{ oj ";
aStr += aJoin; aStr += aJoin;
if ( bUseEscape ) if ( bUseEscape )
aStr += " }"; aStr += " }";
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="useoj"> <object class="GtkCheckButton" id="useoj">
<property name="label" translatable="yes">Use Outer Join syntax '{OJ }'</property> <property name="label" translatable="yes">Use Outer Join syntax '{oj }'</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment