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

Comparing ibx/trunk/fbintf/client/3.0/FB30Attachment.pas (file contents):
Revision 117 by tony, Mon Jan 22 13:58:11 2018 UTC vs.
Revision 143 by tony, Fri Feb 23 12:11:21 2018 UTC

# Line 55 | Line 55 | type
55      constructor CreateDatabase(sql: AnsiString; aSQLDialect: integer;
56        RaiseExceptionOnError: boolean); overload;
57      destructor Destroy; override;
58 +    function GetDBInfo(ReqBuffer: PByte; ReqBufLen: integer): IDBInformation;
59 +      override;
60      property AttachmentIntf: Firebird.IAttachment read FAttachmentIntf;
61  
62    public
# Line 93 | Line 95 | type
95      {Database Information}
96      function GetBlobMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IBlobMetaData;
97      function GetArrayMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IArrayMetaData;
96    function GetDBInformation(Requests: array of byte): IDBInformation; overload; override;
97    function GetDBInformation(Request: byte): IDBInformation; overload; override;
98    end;
99  
100   implementation
# Line 183 | Line 183 | begin
183      FAttachmentIntf.release;
184   end;
185  
186 + function TFB30Attachment.GetDBInfo(ReqBuffer: PByte; ReqBufLen: integer): IDBInformation;
187 + begin
188 +  Result := TDBInformation.Create;
189 +  with Firebird30ClientAPI, Result as TDBInformation do
190 +  begin
191 +    FAttachmentIntf.getInfo(StatusIntf, ReqBufLen, BytePtr(ReqBuffer),
192 +                               getBufSize, BytePtr(Buffer));
193 +      Check4DataBaseError;
194 +  end
195 + end;
196 +
197   procedure TFB30Attachment.Connect;
198   begin
199    with Firebird30ClientAPI do
# Line 360 | Line 371 | begin
371    Result := TFB30ArrayMetaData.Create(self,Transaction as TFB30Transaction,tableName,columnName);
372   end;
373  
363 function TFB30Attachment.GetDBInformation(Requests: array of byte
364  ): IDBInformation;
365 var ReqBuffer: PByte;
366    i: integer;
367 begin
368  CheckHandle;
369  if Length(Requests) = 1 then
370    Result := GetDBInformation(Requests[0])
371  else
372  begin
373    Result := TDBInformation.Create;
374    GetMem(ReqBuffer,Length(Requests));
375    try
376      for i := 0 to Length(Requests) - 1 do
377        ReqBuffer[i] := Requests[i];
378
379      with Firebird30ClientAPI, Result as TDBInformation do
380      begin
381        FAttachmentIntf.getInfo(StatusIntf, Length(Requests), BytePtr(ReqBuffer),
382                                 getBufSize, BytePtr(Buffer));
383          Check4DataBaseError;
384      end
385
386    finally
387      FreeMem(ReqBuffer);
388    end;
389  end;
390 end;
391
392 function TFB30Attachment.GetDBInformation(Request: byte): IDBInformation;
393 begin
394  CheckHandle;
395  Result := TDBInformation.Create;
396  with Firebird30ClientAPI, Result as TDBInformation do
397  begin
398    FAttachmentIntf.getInfo(StatusIntf, 1, BytePtr(@Request),
399                           getBufSize, BytePtr(Buffer));
400      Check4DataBaseError;
401  end;
402 end;
403
374   end.
375  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines