ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/udr/client/IBUtils.pas
(Generate patch)

Comparing ibx/trunk/fbintf/IBUtils.pas (file contents):
Revision 270 by tony, Fri Jan 18 11:10:37 2019 UTC vs.
Revision 311 by tony, Mon Aug 24 09:32:58 2020 UTC

# Line 280 | Line 280 | type
280    sqltOpenBracket,
281    sqltCloseBracket,
282    sqltPipe,
283 +  sqltMinus,
284    sqltConcatSymbol,
285    sqltLT,
286    sqltGT,
# Line 736 | Line 737 | end;
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;
# Line 968 | Line 970 | end;
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]) + '"'
# Line 1036 | Line 1039 | begin
1039        Result := Result + '/*' + TokenText + '*/';
1040  
1041      sqltCommentLine:
1042 <      Result := Result + '//' + TokenText + LineEnding;
1042 >      Result := Result + '--' + TokenText + LineEnding;
1043  
1044      sqltEOL:
1045        Result := Result + LineEnding;
# Line 1210 | Line 1213 | begin
1213        Result := sqltOpenSquareBracket;
1214      ']':
1215        Result := sqltCloseSquareBracket;
1216 +    '-':
1217 +      Result := sqltMinus;
1218      '<':
1219        Result := sqltLT;
1220      '>':
# Line 1482 | Line 1487 | begin
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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines