* Add RoutesRegistered property to TSQLDBRestBridge

git-svn-id: trunk@42264 -
This commit is contained in:
michael 2019-06-22 07:33:49 +00:00
parent 4cb612252a
commit 961b27b4a7

View File

@ -231,6 +231,7 @@ Type
FMetadataItemRoute: THTTPRoute;
FStatus: TRestStatusConfig;
FStrings: TRestStringsConfig;
function GetRoutesRegistered: Boolean;
procedure SetActive(AValue: Boolean);
procedure SetAdminUserIDS(AValue: TStrings);
procedure SetAuthenticator(AValue: TRestAuthenticator);
@ -325,6 +326,7 @@ Type
Function ExposeDatabase(Const aType,aHostName,aDatabaseName,aUserName,aPassword : String; aTables : TStrings = nil; aMinFieldOpts : TRestFieldOptions = []) : TSQLDBRestConnection;
Function ExposeConnection(aOwner : TComponent; Const aConnection : TSQLDBRestConnection; aTables : TStrings = nil; aMinFieldOpts : TRestFieldOptions = []) : TSQLDBRestSchema;
Function ExposeConnection(Const aConnection : TSQLDBRestConnection; aTables : TStrings = nil; aMinFieldOpts : TRestFieldOptions = []) : TSQLDBRestSchema;
Property RoutesRegistered : Boolean Read GetRoutesRegistered;
Published
// Register or unregister HTTP routes
Property Active : Boolean Read FActive Write SetActive;
@ -518,6 +520,11 @@ begin
FActive:=AValue;
end;
function TSQLDBRestDispatcher.GetRoutesRegistered: Boolean;
begin
Result:=FItemRoute<>Nil;
end;
procedure TSQLDBRestDispatcher.SetAdminUserIDS(AValue: TStrings);
begin
if FAdminUserIDs=AValue then Exit;