Skip to content

Commit

Permalink
Define Firebird 4.0 configuration entries
Browse files Browse the repository at this point in the history
  • Loading branch information
ccy committed Apr 16, 2023
1 parent bd92415 commit 2640964
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion delphi-firebird-api
20 changes: 20 additions & 0 deletions source/testcase/firebird.api.testcase.pas
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ TTestCase_FirebirdAPI = class(TTestCase)
procedure Test_attachDatabase;
procedure Test_attachServiceManager;
procedure Test_createDatabase;
procedure getConfigManager;
end;

implementation
Expand Down Expand Up @@ -87,6 +88,25 @@ procedure TTestCase_FirebirdAPI.TearDown;
inherited;
end;

procedure TTestCase_FirebirdAPI.getConfigManager;
begin
var c := master.getConfigManager.getFirebirdConf;
status('Version: ' + c.getVersion(fbstatus).ToHexString);

for var e in TFirebirdConf.entries do begin
var v: string;
case e.data_type of
TYPE_BOOLEAN: v := c.asBoolean(c.getKey(e.key)).ToString;
TYPE_INTEGER: v := c.asInteger(c.getKey(e.key)).ToString;
TYPE_STRING: v := c.asString(c.getKey(e.key), 0);
end;
status(e.key + '=' + v);
end;

var s := master.getConfigManager.getDirectory(IConfigManager.DIR_PLUGINS, 0);
status('Directory plugins: ' + s);
end;

procedure TTestCase_FirebirdAPI.Test_attachDatabase;
begin
var p := util.getXpbBuilder(fbstatus, IXpbBuilder.DPB, nil, 0);
Expand Down

0 comments on commit 2640964

Please sign in to comment.