ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/fbsql/fbsql.lpr
(Generate patch)

Comparing ibx/trunk/examples/fbsql/fbsql.lpr (file contents):
Revision 142 by tony, Thu Jan 18 14:37:23 2018 UTC vs.
Revision 143 by tony, Fri Feb 23 12:11:21 2018 UTC

# Line 230 | Line 230 | begin
230    Opts := TStringList.Create;
231    NonOpts := TStringList.Create;
232    try
233 <    ErrorMsg := CheckOptions('aAhbeu:i:o:p:r:s:t:',['help','user','pass','role'],Opts,NonOpts);
233 >    ErrorMsg := CheckOptions('aAhbegu:i:o:p:r:s:t:',['help','user','pass','role'],Opts,NonOpts);
234      {Database name is last parameter if given and not an option}
235      if (NonOpts.Count > 0) and ((Opts.Count = 0) or
236               ((Opts.ValueFromIndex[Opts.Count-1] <> NonOpts[NonOpts.Count-1])) or
237 <             (ParamCount = 1) or (ParamStr(ParamCount-1)[2] in ['!','A','h','b','e']))then
237 >             (ParamCount = 1) or (ParamStr(ParamCount-1)[2] in ['!','A','h','b','e','g']))then
238        FIBDatabase.DatabaseName := ParamStr(ParamCount);
239    finally
240      Opts.Free;
# Line 272 | Line 272 | begin
272    {Process Command line options}
273  
274    if HasOption('a') then
275 +  begin
276      DoExtract := true;
277 +  end;
278  
279    if HasOption('A') then
280    begin
# Line 292 | Line 294 | begin
294    if HasOption('i') then
295      SQLFileName := GetOptionValue('i');
296  
297 +  if HasOption('g')then
298 +    ExtractTypes += [etGrantsToUser];
299 +
300    if HasOption('o') then
301    begin
302      OutputFileName := GetOptionValue('o');
# Line 426 | Line 431 | begin
431    writeln(stderr,'-A            write database metadata and table data to stdout');
432    writeln(stderr,'-b            stop on first error');
433    writeln(stderr,'-e            echo sql statements to stdout');
434 +  writeln(stderr,'-g            include grants to normal users in database metadata');
435    writeln(stderr,'-i <filename> execute SQL script from file');
436    writeln(stderr,'-h            show this information');
437    writeln(stderr,'-o <filename> output to this file instead of stdout');

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines