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

Comparing ibx/trunk/fbintf/client/3.0/FB30ClientAPI.pas (file contents):
Revision 307 by tony, Thu Dec 6 15:55:01 2018 UTC vs.
Revision 308 by tony, Sat Jul 18 10:26:30 2020 UTC

# Line 108 | Line 108 | type
108      function HasServiceAPI: boolean;
109      function HasRollbackRetaining: boolean;
110      function IsEmbeddedServer: boolean; override;
111 <    function GetImplementationVersion: AnsiString;
111 >    function GetClientMajor: integer; override;
112 >    function GetClientMinor: integer; override;
113  
114      {Firebird 3 API}
115      function HasMasterIntf: boolean;
# Line 122 | Line 123 | type
123      function SQLDecodeTime(bufptr: PByte): TDateTime;  override;
124      procedure SQLEncodeDateTime(aDateTime: TDateTime; bufptr: PByte); override;
125      function SQLDecodeDateTime(bufptr: PByte): TDateTime; override;
126 +    function FormatStatus(Status: TFBStatus): AnsiString; override;
127  
128      {Firebird Interfaces}
129      property MasterIntf: Firebird.IMaster read FMaster;
# Line 343 | Line 345 | begin
345    Result := FIsEmbeddedServer;
346   end;
347  
348 < function TFB30ClientAPI.GetImplementationVersion: AnsiString;
348 > function TFB30ClientAPI.GetClientMajor: integer;
349   begin
350 <  Result := Format('3.%d',[UtilIntf.GetClientVersion]);
350 >  Result := UtilIntf.GetClientVersion div 256;
351 > end;
352 >
353 > function TFB30ClientAPI.GetClientMinor: integer;
354 > begin
355 >  Result := UtilIntf.GetClientVersion mod 256;
356   end;
357  
358   function TFB30ClientAPI.DecodeInteger(bufptr: PByte; len: short): integer;
# Line 418 | Line 425 | begin
425    Result := Result + SQLDecodeTime(bufPtr);
426   end;
427  
428 + function TFB30ClientAPI.FormatStatus(Status: TFBStatus): AnsiString;
429 + var local_buffer: array[0..IBHugeLocalBufferLength - 1] of AnsiChar;
430 + begin
431 +  Result := '';
432 +  if UtilIntf.formatStatus(@local_buffer,sizeof(local_buffer),(Status as TFB30Status).GetStatus) > 0 then
433 +    Result := strpas(local_buffer);
434 + end;
435 +
436   end.
437  
438  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines