280 |
|
sqltOpenBracket, |
281 |
|
sqltCloseBracket, |
282 |
|
sqltPipe, |
283 |
+ |
sqltMinus, |
284 |
|
sqltConcatSymbol, |
285 |
|
sqltLT, |
286 |
|
sqltGT, |
737 |
|
|
738 |
|
function QuoteIdentifier(Dialect: Integer; Value: AnsiString): AnsiString; |
739 |
|
begin |
740 |
+ |
Value := TrimRight(Value); |
741 |
|
if Dialect = 1 then |
742 |
< |
Value := AnsiUpperCase(Trim(Value)) |
742 |
> |
Value := AnsiUpperCase(Value) |
743 |
|
else |
744 |
|
Value := '"' + StringReplace (Value, '""', '"', [rfReplaceAll]) + '"'; |
745 |
|
Result := Value; |
970 |
|
|
971 |
|
function QuoteIdentifierIfNeeded(Dialect: Integer; Value: AnsiString): AnsiString; |
972 |
|
begin |
973 |
+ |
Value := TrimRight(Value); |
974 |
|
if (Dialect = 3) and |
975 |
|
(IsReservedWord(Value) or not IsSQLIdentifier(Value) or (AnsiUpperCase(Value) <> Value)) then |
976 |
|
Result := '"' + StringReplace (TrimRight(Value), '"', '""', [rfReplaceAll]) + '"' |
1039 |
|
Result := Result + '/*' + TokenText + '*/'; |
1040 |
|
|
1041 |
|
sqltCommentLine: |
1042 |
< |
Result := Result + '//' + TokenText + LineEnding; |
1042 |
> |
Result := Result + '--' + TokenText + LineEnding; |
1043 |
|
|
1044 |
|
sqltEOL: |
1045 |
|
Result := Result + LineEnding; |
1213 |
|
Result := sqltOpenSquareBracket; |
1214 |
|
']': |
1215 |
|
Result := sqltCloseSquareBracket; |
1216 |
+ |
'-': |
1217 |
+ |
Result := sqltMinus; |
1218 |
|
'<': |
1219 |
|
Result := sqltLT; |
1220 |
|
'>': |
1487 |
|
GetNext; |
1488 |
|
FState := stInComment; |
1489 |
|
end |
1490 |
< |
else |
1491 |
< |
if FNextToken = sqltForwardSlash then |
1490 |
> |
end; |
1491 |
> |
|
1492 |
> |
sqltMinus: |
1493 |
> |
begin |
1494 |
> |
if FNextToken = sqltMinus then |
1495 |
|
begin |
1496 |
|
FString := ''; |
1497 |
|
GetNext; |