Skip to content
Permalink
Browse files

Move TDBConnection.FRegClasses one down in class hierarchy, where it …

…belongs
  • Loading branch information
ansgarbecker committed Jan 1, 2020
1 parent 416252d commit 687d1d82a6c8323127412de69555ba4effbee76e
Showing with 5 additions and 5 deletions.
  1. +5 −5 source/dbconnection.pas
@@ -351,7 +351,6 @@ TDBConnection = class(TComponent)
FKeepAliveTimer: TTimer;
FFavorites: TStringList;
FPrefetchResults: TDBQueryList;
FRegClasses: TOidStringPairs;
procedure SetActive(Value: Boolean); virtual; abstract;
procedure DoBeforeConnect; virtual;
procedure DoAfterConnect; virtual;
@@ -463,7 +462,6 @@ TDBConnection = class(TComponent)
property LockedByThread: TThread read FLockedByThread write SetLockedByThread;
property Datatypes: TDBDataTypeArray read FDatatypes;
property Favorites: TStringList read FFavorites;
property RegClasses: TOidStringPairs read FRegClasses;
function GetLockedTableCount(db: String): Integer;
function IdentifierEquals(Ident1, Ident2: String): Boolean;
published
@@ -549,6 +547,7 @@ TPgConnection = class(TDBConnection)
FHandle: PPGconn;
FLib: TPostgreSQLLib;
FLastRawResults: TPGRawResults;
FRegClasses: TOidStringPairs;
procedure SetActive(Value: Boolean); override;
procedure DoBeforeConnect; override;
function GetThreadId: Int64; override;
@@ -568,6 +567,7 @@ TPgConnection = class(TDBConnection)
function ConnectionInfo: TStringList; override;
function GetRowCount(Obj: TDBObject): Int64; override;
property LastRawResults: TPGRawResults read FLastRawResults;
property RegClasses: TOidStringPairs read FRegClasses;
end;

TSQLiteConnection = class;
@@ -1659,8 +1659,6 @@ constructor TDBConnection.Create(AOwner: TComponent);
FCurrentUserHostCombination := '';
FKeepAliveTimer := TTimer.Create(Self);
FFavorites := TStringList.Create;
// PG only, cache for 123::regclass queries:
FRegClasses := TOidStringPairs.Create;
end;


@@ -1703,6 +1701,8 @@ constructor TPgConnection.Create(AOwner: TComponent);
SetLength(FDatatypes, Length(PostGreSQLDatatypes));
for i:=0 to High(PostGreSQLDatatypes) do
FDatatypes[i] := PostGreSQLDatatypes[i];
// cache for 123::regclass queries:
FRegClasses := TOidStringPairs.Create;
end;


@@ -1725,7 +1725,6 @@ destructor TDBConnection.Destroy;
ClearCache(True);
FKeepAliveTimer.Free;
FFavorites.Free;
FRegClasses.Free;
inherited;
end;

@@ -1742,6 +1741,7 @@ destructor TPgConnection.Destroy;
begin
if Active then Active := False;
//FreeAndNil(FHandle);
FRegClasses.Free;
inherited;
end;

0 comments on commit 687d1d8

Please sign in to comment.
You can’t perform that action at this time.