115 |
|
|
116 |
|
{ TFBStatus } |
117 |
|
|
118 |
< |
TFBStatus = class(TFBInterfacedObject) |
118 |
> |
TFBStatus = class(TFBInterfacedObject, IStatus) |
119 |
|
private |
120 |
|
FIBDataBaseErrorMessages: TIBDataBaseErrorMessages; |
121 |
|
FPrefix: AnsiString; |
126 |
|
function GetSQLMessage: Ansistring; |
127 |
|
public |
128 |
|
constructor Create(aOwner: TFBClientAPI; prefix: AnsiString=''); |
129 |
+ |
constructor Copy(src: TFBStatus); |
130 |
|
function StatusVector: PStatusVector; virtual; abstract; |
131 |
+ |
function Clone: IStatus; virtual; abstract; |
132 |
|
|
133 |
|
{IStatus} |
134 |
+ |
function InErrorState: boolean; virtual; abstract; |
135 |
|
function GetIBErrorCode: TStatusCode; |
136 |
|
function Getsqlcode: TStatusCode; |
137 |
|
function GetMessage: AnsiString; |
251 |
|
IJournallingHook = interface |
252 |
|
['{7d3e45e0-3628-416a-9e22-c20474825031}'] |
253 |
|
procedure TransactionStart(Tr: ITransaction); |
254 |
< |
function TransactionEnd(TransactionID: integer; Action: TTransactionAction): boolean; |
254 |
> |
function TransactionEnd(TransactionID: integer; Completion: TTrCompletionState): boolean; |
255 |
|
procedure TransactionRetained(Tr: ITransaction; OldTransactionID: integer; Action: TTransactionAction); |
256 |
|
procedure ExecQuery(Stmt: IStatement); |
257 |
+ |
procedure ExecImmediateJnl(sql: AnsiString; tr: ITransaction); |
258 |
|
end; |
259 |
|
|
260 |
|
implementation |
641 |
|
FIBDataBaseErrorMessages := [ShowIBMessage]; |
642 |
|
end; |
643 |
|
|
644 |
+ |
constructor TFBStatus.Copy(src: TFBStatus); |
645 |
+ |
begin |
646 |
+ |
inherited Create; |
647 |
+ |
FOwner := src.FOwner; |
648 |
+ |
FPrefix := src.FPrefix; |
649 |
+ |
SetIBDataBaseErrorMessages(src.GetIBDataBaseErrorMessages); |
650 |
+ |
end; |
651 |
+ |
|
652 |
|
function TFBStatus.GetIBErrorCode: TStatusCode; |
653 |
|
begin |
654 |
|
Result := StatusVector^[1]; |