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

Comparing ibx/trunk/fbintf/client/3.0/FB30Array.pas (file contents):
Revision 262 by tony, Thu Jan 18 14:37:59 2018 UTC vs.
Revision 263 by tony, Thu Dec 6 15:55:01 2018 UTC

# Line 39 | Line 39 | interface
39  
40   uses
41    Classes, SysUtils, Firebird, IB, FBArray, IBHeader, FB30Attachment, FBClientAPI,
42 <  FB30Transaction, FBParamBlock;
42 >  FB30Transaction, FBParamBlock, FB30ClientAPI;
43  
44   type
45  
# Line 74 | Line 74 | type
74    private
75      FAttachmentIntf: Firebird.IAttachment;
76      FTransactionIntf: Firebird.ITransaction;
77 +    FFirebird30ClientAPI: TFB30ClientAPI;
78      FSDL: ISDL;
79    protected
80      procedure AllocateBuffer; override;
# Line 90 | Line 91 | type
91  
92    TSDLBlock = class (TCustomParamBlock<TSDLItem,ISDLItem>, ISDL)
93    public
94 <    constructor Create;
94 >    constructor Create(api: TFBClientAPI);
95    end;
96  
97   implementation
98  
99 < uses FBAttachment, FB30ClientAPI, FB30Statement;
99 > uses FBAttachment, FB30Statement;
100  
101   const
102    sGetArrayMetaData = 'Select F.RDB$FIELD_LENGTH, F.RDB$FIELD_SCALE, F.RDB$FIELD_TYPE, '+
# Line 125 | Line 126 | procedure TFB30ArrayMetaData.LoadMetaDat
126   var stmt: IStatement;
127      CharWidth: integer;
128   begin
129 +  CharWidth := 0;
130    RelationName := AnsiUpperCase(RelationName);
131    ColumnName := AnsiUpperCase(ColumnName);
132    stmt := TFB30Statement.Create(aAttachment as TFB30Attachment,aTransaction,
# Line 201 | Line 203 | begin
203    inherited AllocateBuffer;
204    {Now set up the SDL}
205  
206 <  FSDL := TSDLBlock.Create;
206 >  FSDL := TSDLBlock.Create(FFirebird30ClientAPI);
207    with GetArrayDesc^ do
208    {The following is based on gen_SDL from Firebird src/dsql/array.cpp}
209    begin
# Line 248 | Line 250 | end;
250  
251   procedure TFB30Array.InternalGetSlice;
252   begin
253 <  with Firebird30ClientAPI do
253 >  with FFirebird30ClientAPI do
254    begin
255      FAttachmentIntf.getSlice(StatusIntf,FTransactionIntf,
256                            @FArrayID,
# Line 264 | Line 266 | end;
266  
267   procedure TFB30Array.InternalPutSlice(Force: boolean);
268   begin
269 <  with Firebird30ClientAPI do
269 >  with FFirebird30ClientAPI do
270    begin
271      FAttachmentIntf.putSlice(StatusIntf,FTransactionIntf, @FArrayID,
272                            (FSDL as TSDLBlock).getDataLength,
# Line 284 | Line 286 | begin
286    inherited Create(aAttachment,aTransaction,aField);
287    FAttachmentIntf := aAttachment.AttachmentIntf;
288    FTransactionIntf := aTransaction.TransactionIntf;
289 +  FFirebird30ClientAPI := aAttachment.Firebird30ClientAPI;
290   end;
291  
292   constructor TFB30Array.Create(aAttachment: TFB30Attachment;
# Line 292 | Line 295 | begin
295    inherited Create(aAttachment,aTransaction,aField,ArrayID);
296    FAttachmentIntf := aAttachment.AttachmentIntf;
297    FTransactionIntf := aTransaction.TransactionIntf;
298 +  FFirebird30ClientAPI := aAttachment.Firebird30ClientAPI;
299   end;
300  
301   { TSDLBlock }
302  
303 < constructor TSDLBlock.Create;
303 > constructor TSDLBlock.Create(api: TFBClientAPI);
304   begin
305 <  inherited Create;
305 >  inherited Create(api);
306    FDataLength := 1;
307    FBuffer^ := isc_sdl_version1;
308   end;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines