|
@@ -260,7 +260,7 @@ begin
|
|
if (Result='') then
|
|
if (Result='') then
|
|
begin
|
|
begin
|
|
if FEmitLine then
|
|
if FEmitLine then
|
|
- AddToStatement(S,(FCol=1));
|
|
|
|
|
|
+ AddToStatement(S,(FCol<=1));
|
|
FCol:=1;
|
|
FCol:=1;
|
|
FLine:=FLine+1;
|
|
FLine:=FLine+1;
|
|
end
|
|
end
|
|
@@ -442,11 +442,12 @@ function TCustomSQLScript.NextStatement: AnsiString;
|
|
|
|
|
|
var
|
|
var
|
|
pnt: AnsiString;
|
|
pnt: AnsiString;
|
|
- terminator_found: Boolean;
|
|
|
|
|
|
+ addnewline,terminator_found: Boolean;
|
|
|
|
|
|
begin
|
|
begin
|
|
terminator_found:=False;
|
|
terminator_found:=False;
|
|
ClearStatement;
|
|
ClearStatement;
|
|
|
|
+ addnewline:=false;
|
|
while FLine <= FSQL.Count do
|
|
while FLine <= FSQL.Count do
|
|
begin
|
|
begin
|
|
pnt:=FindNextSeparator([FTerminator, '/*', '"', '''', '--']);
|
|
pnt:=FindNextSeparator([FTerminator, '/*', '"', '''', '--']);
|
|
@@ -476,7 +477,10 @@ begin
|
|
begin
|
|
begin
|
|
FComment:=True;
|
|
FComment:=True;
|
|
if FCommentsInSQL then
|
|
if FCommentsInSQL then
|
|
- AddToStatement(Copy(FSQL[FLine-1],FCol,Length(FSQL[FLine-1])-FCol+1),True);
|
|
|
|
|
|
+ begin
|
|
|
|
+ AddToStatement(Copy(FSQL[FLine-1],FCol,Length(FSQL[FLine-1])-FCol+1),False);
|
|
|
|
+ AddNewLine:=true;
|
|
|
|
+ end;
|
|
Inc(Fline);
|
|
Inc(Fline);
|
|
FCol:=0;
|
|
FCol:=0;
|
|
FComment:=False;
|
|
FComment:=False;
|
|
@@ -494,7 +498,8 @@ begin
|
|
AddToStatement(pnt,False);
|
|
AddToStatement(pnt,False);
|
|
FCol:=FCol + length(pnt);
|
|
FCol:=FCol + length(pnt);
|
|
pnt:=FindNextSeparator(['''']);
|
|
pnt:=FindNextSeparator(['''']);
|
|
- AddToStatement(pnt,false);
|
|
|
|
|
|
+ AddToStatement(pnt,addnewline);
|
|
|
|
+ addnewline:=False;
|
|
FCol:=FCol + length(pnt);
|
|
FCol:=FCol + length(pnt);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|