- spCurrentUserHost now Interbase-Compatible

- FetchDbObjects / Get Tables&Vies Interbase-Compatible
This commit is contained in:
Jan Kohlmeyer
2022-03-07 21:35:20 +01:00
committed by Ansgar Becker
parent 2befc563ee
commit 9073dc7836

View File

@ -3049,6 +3049,9 @@ begin
FSQLSpecifities[spEmptyTable] := 'TRUNCATE ';
FSQLSpecifities[spRenameTable] := 'RENAME TABLE %s TO %s';
FSQLSpecifities[spRenameView] := FSQLSpecifities[spRenameTable];
if Self.Parameters.LibraryOrProvider = 'IB' then
FSQLSpecifities[spCurrentUserHost] := 'select user from rdb$database'
else
FSQLSpecifities[spCurrentUserHost] := 'select current_user || ''@'' || mon$attachments.mon$remote_host from mon$attachments where mon$attachments.mon$attachment_id = current_connection';
FSQLSpecifities[spLikeCompare] := '%s LIKE %s';
FSQLSpecifities[spAddColumn] := 'ADD COLUMN %s';
@ -7153,10 +7156,21 @@ begin
obj.Updated := Now;
obj.Database := db;
obj.Comment := Results.Col('RDB$DESCRIPTION');
if self. Parameters.LibraryOrProvider.Equals('IB') then
begin
if Results.Col('ViewContext') = 'PERSISTENT' then
obj.NodeType := lntTable
else
obj.NodeType := lntView;
end
else
begin
if Results.Col('ViewContext') = '0' then
obj.NodeType := lntTable
else
obj.NodeType := lntView;
end;
Results.Next;
end;
finally