82 |
|
procedure CheckChangeBatchRowLimit; virtual; |
83 |
|
procedure CheckHandle; virtual; abstract; |
84 |
|
procedure CheckTransaction(aTransaction: ITransaction); |
85 |
< |
procedure DoJournaling; |
85 |
> |
procedure DoJournaling(force: boolean); |
86 |
|
function GetJournalIntf: IJournallingHook; |
87 |
|
function GetStatementIntf: IStatement; virtual; abstract; |
88 |
|
procedure GetDsqlInfo(info_request: byte; buffer: ISQLInfoResults); overload; virtual; abstract; |
174 |
|
IBError(ibxeNotInTransaction,[]); |
175 |
|
end; |
176 |
|
|
177 |
< |
procedure TFBStatement.DoJournaling; |
177 |
> |
procedure TFBStatement.DoJournaling(force: boolean); |
178 |
|
function doGetRowsAffected: integer; |
179 |
|
var a,i,u,d: integer; |
180 |
|
begin |
186 |
|
begin |
187 |
|
RowsAffected := doGetRowsAffected; |
188 |
|
with GetAttachment do |
189 |
< |
if JournalingActive and |
189 |
> |
if JournalingActive and (force or |
190 |
|
(((joReadOnlyQueries in GetJournalOptions) and (RowsAffected = 0)) or |
191 |
< |
((joModifyQueries in GetJournalOptions) and (RowsAffected > 0))) then |
191 |
> |
((joModifyQueries in GetJournalOptions) and (RowsAffected > 0)))) then |
192 |
|
GetJournalIntf.ExecQuery(GetStatementIntf); |
193 |
|
end; |
194 |
|
|
356 |
|
|
357 |
|
function TFBStatement.Execute(aTransaction: ITransaction): IResults; |
358 |
|
begin |
359 |
< |
if aTransaction = nil then |
360 |
< |
Result := InternalExecute(FTransactionIntf) |
361 |
< |
else |
362 |
< |
Result := InternalExecute(aTransaction); |
363 |
< |
DoJournaling; |
359 |
> |
try |
360 |
> |
if aTransaction = nil then |
361 |
> |
Result := InternalExecute(FTransactionIntf) |
362 |
> |
else |
363 |
> |
Result := InternalExecute(aTransaction); |
364 |
> |
finally |
365 |
> |
DoJournaling(ExceptObject <> nil); |
366 |
> |
end; |
367 |
|
end; |
368 |
|
|
369 |
|
procedure TFBStatement.AddToBatch; |
417 |
|
): IResultSet; |
418 |
|
begin |
419 |
|
Close; |
420 |
< |
if aTransaction = nil then |
421 |
< |
Result := InternalOpenCursor(FTransactionIntf,Scrollable) |
422 |
< |
else |
423 |
< |
Result := InternalOpenCursor(aTransaction,Scrollable); |
424 |
< |
DoJournaling; |
420 |
> |
try |
421 |
> |
if aTransaction = nil then |
422 |
> |
Result := InternalOpenCursor(FTransactionIntf,Scrollable) |
423 |
> |
else |
424 |
> |
Result := InternalOpenCursor(aTransaction,Scrollable); |
425 |
> |
finally |
426 |
> |
DoJournaling(ExceptObject <> nil); |
427 |
> |
end; |
428 |
|
end; |
429 |
|
|
430 |
|
function TFBStatement.CreateBlob(paramName: AnsiString): IBlob; |