View Issue Details

IDProjectCategoryView StatusLast Update
0032625FPCFCLpublic2019-10-06 13:22
ReporterJohn KozikopoulosAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformallOSallOS Versionall
Product Version3.0.0Product Build 
Target VersionFixed in Version3.3.1 
Summary0032625: TSQLParser unsupported firebird syntax.
DescriptionThe following script has syntax unsupport from the sql parser.
Steps To Reproducefunction parserScript(const aFilename:TFilename):TStringList;
var
  i: integer;
  Parser: TSQLParser;
  ResultList: TSQLElementList;
  ScriptStream: TMemoryStream;
begin
  ScriptStream:=TFileStream.Create(aFilename, fmopenreadwrite or fmshareexclusive);
  try
    ScriptStream.Position:=0;
    try
      Result := TStringList.Create;
      try
        Parser := TSQLParser.Create(ScriptStream);
        ResultList := Parser.ParseScript();
        for i:=0 to ResultList.Count-1 do begin
          Result.Add(ResultList[i].GetAsSQL([sfoDoubleQuoteIdentifier]));
        end;
      except
        result.free;
        raise;
      end;
    finally
      Parser.Free;
    end;
  finally
    ScriptStream.Free;
    ResultList.Free;
  end;
end;
TagsNo tags attached.
Fixed in Revision43139
FPCOldBugId
FPCTarget3.2.0
Attached Files

Activities

John Kozikopoulos

2017-10-29 10:59

reporter  

EMPLOYEE.FDB.zip (11,864 bytes)

Michael Van Canneyt

2019-10-06 13:22

administrator   ~0118374

Fixed. Added support for RECREATE, SEQUENCE, multidimensional fields, and, under an option SET TERM.
Added an example parser program which reads a file and dumps the output.
Please test and close if OK.

Issue History

Date Modified Username Field Change
2017-10-29 10:59 John Kozikopoulos New Issue
2017-10-29 10:59 John Kozikopoulos File Added: EMPLOYEE.FDB.zip
2017-10-29 11:02 Michael Van Canneyt Assigned To => Michael Van Canneyt
2017-10-29 11:02 Michael Van Canneyt Status new => assigned
2019-10-06 13:22 Michael Van Canneyt Status assigned => resolved
2019-10-06 13:22 Michael Van Canneyt Resolution open => fixed
2019-10-06 13:22 Michael Van Canneyt Fixed in Version => 3.3.1
2019-10-06 13:22 Michael Van Canneyt Fixed in Revision => 43139
2019-10-06 13:22 Michael Van Canneyt FPCTarget => 3.2.0
2019-10-06 13:22 Michael Van Canneyt Note Added: 0118374