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

Comparing:
ibx/trunk/fbintf/client/3.0/FB30Attachment.pas (file contents), Revision 345 by tony, Mon Aug 23 14:22:29 2021 UTC vs.
ibx/branches/journaling/fbintf/client/3.0/FB30Attachment.pas (file contents), Revision 363 by tony, Tue Dec 7 13:30:05 2021 UTC

# Line 53 | Line 53 | type
53      procedure SetUseRemoteICU(aValue: boolean);
54    protected
55      procedure CheckHandle; override;
56 +    function GetAttachment: IAttachment; override;
57    public
58      constructor Create(api: TFB30ClientAPI; DatabaseName: AnsiString; aDPB: IDPB;
59            RaiseExceptionOnConnectError: boolean);
# Line 71 | Line 72 | type
72      procedure Disconnect(Force: boolean=false); override;
73      function IsConnected: boolean; override;
74      procedure DropDatabase;
75 <    function StartTransaction(TPB: array of byte; DefaultCompletion: TTransactionCompletion): ITransaction; override;
76 <    function StartTransaction(TPB: ITPB; DefaultCompletion: TTransactionCompletion): ITransaction; override;
75 >    function StartTransaction(TPB: array of byte; DefaultCompletion: TTransactionCompletion; aName: AnsiString=''): ITransaction; override;
76 >    function StartTransaction(TPB: ITPB; DefaultCompletion: TTransactionCompletion; aName: AnsiString=''): ITransaction; override;
77      procedure ExecImmediate(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer); override;
78 <    function Prepare(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IStatement; override;
78 >    function Prepare(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; CursorName: AnsiString=''): IStatement; override;
79      function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString;
80                         aSQLDialect: integer; GenerateParamNames: boolean=false;
81 <                       CaseSensitiveParams: boolean=false): IStatement; override;
81 >                       CaseSensitiveParams: boolean=false; CursorName: AnsiString=''): IStatement; override;
82  
83      {Events}
84      function GetEventHandler(Events: TStrings): IEvents; override;
# Line 102 | Line 103 | type
103      procedure getFBVersion(version: TStrings);
104      function HasDecFloatSupport: boolean; override;
105      function HasBatchMode: boolean; override;
106 +    function HasScollableCursors: boolean;
107  
108      {Time Zone Support}
109      function GetTimeZoneServices: ITimeZoneServices; override;
# Line 171 | Line 173 | begin
173      IBError(ibxeDatabaseClosed,[nil]);
174   end;
175  
176 + function TFB30Attachment.GetAttachment: IAttachment;
177 + begin
178 +  Result := self;
179 + end;
180 +
181   constructor TFB30Attachment.Create(api: TFB30ClientAPI; DatabaseName: AnsiString; aDPB: IDPB;
182    RaiseExceptionOnConnectError: boolean);
183   begin
# Line 276 | Line 283 | end;
283  
284   procedure TFB30Attachment.Disconnect(Force: boolean);
285   begin
286 +  inherited Disconnect(Force);
287    if IsConnected then
288      with FFirebird30ClientAPI do
289      begin
# Line 302 | Line 310 | begin
310      with FFirebird30ClientAPI do
311      begin
312        EndAllTransactions;
313 +      EndSession(false);
314        FAttachmentIntf.dropDatabase(StatusIntf);
315        Check4DataBaseError;
316        FAttachmentIntf := nil;
# Line 309 | Line 318 | begin
318   end;
319  
320   function TFB30Attachment.StartTransaction(TPB: array of byte;
321 <  DefaultCompletion: TTransactionCompletion): ITransaction;
321 >  DefaultCompletion: TTransactionCompletion; aName: AnsiString): ITransaction;
322   begin
323    CheckHandle;
324 <  Result := TFB30Transaction.Create(FFirebird30ClientAPI,self,TPB,DefaultCompletion);
324 >  Result := TFB30Transaction.Create(FFirebird30ClientAPI,self,TPB,DefaultCompletion, aName);
325   end;
326  
327   function TFB30Attachment.StartTransaction(TPB: ITPB;
328 <  DefaultCompletion: TTransactionCompletion): ITransaction;
328 >  DefaultCompletion: TTransactionCompletion; aName: AnsiString): ITransaction;
329   begin
330    CheckHandle;
331 <  Result := TFB30Transaction.Create(FFirebird30ClientAPI,self,TPB,DefaultCompletion);
331 >  Result := TFB30Transaction.Create(FFirebird30ClientAPI,self,TPB,DefaultCompletion,aName);
332   end;
333  
334   procedure TFB30Attachment.ExecImmediate(transaction: ITransaction; sql: AnsiString;
# Line 335 | Line 344 | begin
344   end;
345  
346   function TFB30Attachment.Prepare(transaction: ITransaction; sql: AnsiString;
347 <  aSQLDialect: integer): IStatement;
347 >  aSQLDialect: integer; CursorName: AnsiString): IStatement;
348   begin
349    CheckHandle;
350 <  Result := TFB30Statement.Create(self,transaction,sql,aSQLDialect);
350 >  Result := TFB30Statement.Create(self,transaction,sql,aSQLDialect,CursorName);
351   end;
352  
353   function TFB30Attachment.PrepareWithNamedParameters(transaction: ITransaction;
354    sql: AnsiString; aSQLDialect: integer; GenerateParamNames: boolean;
355 <  CaseSensitiveParams: boolean): IStatement;
355 >  CaseSensitiveParams: boolean; CursorName: AnsiString): IStatement;
356   begin
357    CheckHandle;
358    Result := TFB30Statement.CreateWithParameterNames(self,transaction,sql,aSQLDialect,
359 <         GenerateParamNames,CaseSensitiveParams);
359 >         GenerateParamNames,CaseSensitiveParams,CursorName);
360   end;
361  
362   function TFB30Attachment.GetEventHandler(Events: TStrings): IEvents;
# Line 441 | Line 450 | begin
450       (GetODSMajorVersion >= 13);
451   end;
452  
453 + function TFB30Attachment.HasScollableCursors: boolean;
454 + begin
455 +  Result := (GetODSMajorVersion >= 12);
456 + end;
457 +
458   function TFB30Attachment.GetTimeZoneServices: ITimeZoneServices;
459   begin
460    if not HasTimeZoneSupport then

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines