ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/journaling/fbintf/client/2.5/FB25Transaction.pas
(Generate patch)

Comparing ibx/trunk/fbintf/client/2.5/FB25Transaction.pas (file contents):
Revision 56 by tony, Mon Mar 6 10:20:02 2017 UTC vs.
Revision 359 by tony, Tue Dec 7 09:37:32 2021 UTC

# Line 82 | Line 82 | type
82    TFB25Transaction = class(TFBTransaction,ITransaction, IActivityMonitor)
83    private
84      FHandle: TISC_TR_HANDLE;
85 +    FFirebird25ClientAPI: TFB25ClientAPI;
86    protected
87      function GetActivityIntf(att: IAttachment): IActivityMonitor; override;
88 +    function GetTrInfo(ReqBuffer: PByte; ReqBufLen: integer): ITrInformation; override;
89 +    procedure SetInterface(api: TFBClientAPI); override;
90    public
91      property Handle: TISC_TR_HANDLE read FHandle;
92  
# Line 109 | Line 112 | begin
112    Result := (att as TFB25Attachment);
113   end;
114  
115 + function TFB25Transaction.GetTrInfo(ReqBuffer: PByte; ReqBufLen: integer
116 +  ): ITrInformation;
117 + begin
118 +  Result := TTrInformation.Create(FFirebird25ClientAPI);
119 +  with FFirebird25ClientAPI, Result as TTrInformation do
120 +     if isc_transaction_info(StatusVector, @(FHandle), ReqBufLen, ReqBuffer,
121 +                               getBufSize, Buffer) > 0 then
122 +          IBDataBaseError;
123 + end;
124 +
125 + procedure TFB25Transaction.SetInterface(api: TFBClientAPI);
126 + begin
127 +  inherited SetInterface(api);
128 +  FFirebird25ClientAPI := api as TFB25ClientAPI;
129 +  OnDatabaseError := FFirebird25ClientAPI.IBDataBaseError;
130 + end;
131 +
132   function TFB25Transaction.GetInTransaction: boolean;
133   begin
134    Result := FHandle <> nil;
# Line 120 | Line 140 | begin
140      IBError(ibxeNotAMultiDatabaseTransaction,[nil]);
141    if FHandle = nil then
142      Exit;
143 <  with Firebird25ClientAPI do
143 >  with FFirebird25ClientAPI do
144      Call(isc_prepare_transaction(StatusVector, @FHandle));
145   end;
146  
# Line 128 | Line 148 | procedure TFB25Transaction.Commit(Force:
148   begin
149    if FHandle = nil then
150      Exit;
151 <  with Firebird25ClientAPI do
151 >  with FFirebird25ClientAPI do
152      Call(isc_commit_transaction(StatusVector, @FHandle),not Force);
153    FHandle := nil;
154   end;
# Line 137 | Line 157 | procedure TFB25Transaction.CommitRetaini
157   begin
158    if FHandle = nil then
159      Exit;
160 <  with Firebird25ClientAPI do
160 >  with FFirebird25ClientAPI do
161      Call(isc_commit_retaining(StatusVector, @FHandle));
162   end;
163  
# Line 150 | Line 170 | begin
170      Exit;
171    pteb := nil;
172    FDefaultCompletion := DefaultCompletion;
173 <  with Firebird25ClientAPI do
173 >  with FFirebird25ClientAPI do
174    if (Length(FAttachments) = 1)  then
175    try
176      db_handle := (FAttachments[0] as TFB25Attachment).Handle;
# Line 189 | Line 209 | procedure TFB25Transaction.Rollback(Forc
209   begin
210    if FHandle = nil then
211      Exit;
212 <  with Firebird25ClientAPI do
212 >  with FFirebird25ClientAPI do
213      Call(isc_rollback_transaction(StatusVector, @FHandle),not Force);
214    FHandle := nil;
215   end;
# Line 198 | Line 218 | procedure TFB25Transaction.RollbackRetai
218   begin
219    if FHandle = nil then
220      Exit;
221 <  with Firebird25ClientAPI do
221 >  with FFirebird25ClientAPI do
222      Call(isc_rollback_retaining(StatusVector, @FHandle));
223   end;
224  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines