mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
38 lines
825 B
ObjectPascal
38 lines
825 B
ObjectPascal
unit dbconnection;
|
|
|
|
{$mode delphi}{$H+}
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, SysUtils, Generics.Collections, Generics.Defaults;
|
|
|
|
type
|
|
TDBConnection = class;
|
|
|
|
{ TDBConnection }
|
|
|
|
TDBLogCategory = (lcInfo, lcSQL, lcUserFiredSQL, lcError, lcDebug, lcScript);
|
|
TDBLogItem = class(TObject)
|
|
public
|
|
Category: TDBLogCategory;
|
|
LineText: String;
|
|
Connection: TDBConnection;
|
|
end;
|
|
TDBLogItems = TObjectList<TDBLogItem>;
|
|
TDBLogEvent = procedure(Msg: String; Category: TDBLogCategory=lcInfo; Connection: TDBConnection=nil) of object;
|
|
TDBEvent = procedure(Connection: TDBConnection; Database: String) of object;
|
|
|
|
TDBConnection = class(TComponent)
|
|
private
|
|
FActive: Boolean;
|
|
public
|
|
end;
|
|
TDBConnectionList = TObjectList<TDBConnection>;
|
|
|
|
|
|
implementation
|
|
|
|
end.
|
|
|