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

Comparing ibx/trunk/fbintf/client/2.5/FB25ClientAPI.pas (file contents):
Revision 307 by tony, Wed Dec 26 18:34:32 2018 UTC vs.
Revision 308 by tony, Sat Jul 18 10:26:30 2020 UTC

# Line 166 | Line 166 | type
166      isc_array_put_slice: Tisc_array_put_slice;
167      isc_prepare_transaction: Tisc_prepare_transaction;
168      isc_version: Tisc_Version;
169 +    isc_interprete: Tisc_interprete;
170  
171    public
172      {Helper Functions}
# Line 176 | Line 177 | type
177      function SQLDecodeTime(bufptr: PByte): TDateTime;  override;
178      procedure SQLEncodeDateTime(aDateTime: TDateTime; bufptr: PByte); override;
179      function SQLDecodeDateTime(bufptr: PByte): TDateTime; override;
180 <
180 >    function FormatStatus(Status: TFBStatus): AnsiString; override;
181    public
182      {IFirebirdAPI}
183  
# Line 203 | Line 204 | type
204      function GetStatus: IStatus; override;
205      function HasRollbackRetaining: boolean;
206      function IsEmbeddedServer: boolean; override;
207 <    function GetImplementationVersion: AnsiString;
207 >    function GetClientMajor: integer; override;
208 >    function GetClientMinor: integer; override;
209  
210      {Firebird 3 API}
211      function HasMasterIntf: boolean;
# Line 386 | Line 388 | begin
388    isc_array_put_slice := GetProcAddr('isc_array_put_slice'); {do not localize}
389    isc_prepare_transaction  := GetProcAddr('isc_prepare_transaction'); {do not localize}
390    isc_version  := GetProcAddr('isc_version'); {do not localize}
391 +  isc_interprete := GetProcAddr('isc_interprete'); {do not localize}
392  
393    FIBServiceAPIPresent := true;
394    isc_rollback_retaining := GetProcAddress(FFBLibrary.IBLibrary, 'isc_rollback_retaining'); {do not localize}
# Line 538 | Line 541 | begin
541   {$ENDIF}
542   end;
543  
544 + function TFB25ClientAPI.GetClientMajor: integer;
545 + begin
546 +  Result := 2;
547 + end;
548 +
549 + function TFB25ClientAPI.GetClientMinor: integer;
550 + begin
551 +  Result := 5;
552 + end;
553 +
554   function TFB25ClientAPI.HasMasterIntf: boolean;
555   begin
556    Result := false;
# Line 548 | Line 561 | begin
561    Result := nil;
562   end;
563  
551 function TFB25ClientAPI.GetImplementationVersion: AnsiString;
552 begin
553  Result := FBClientInterfaceVersion;
554 end;
555
564   function TFB25ClientAPI.DecodeInteger(bufptr: PByte; len: short): integer;
565   begin
566    Result := isc_portable_integer(bufptr,len);
# Line 669 | Line 677 | begin
677    end;
678   end;
679  
680 + function TFB25ClientAPI.FormatStatus(Status: TFBStatus): AnsiString;
681 + var psb: PStatusVector;
682 +    local_buffer: array[0..IBHugeLocalBufferLength - 1] of AnsiChar;
683 + begin
684 +  psb := Status.StatusVector;
685 +  Result := '';
686 +  while isc_interprete(@local_buffer,@psb) > 0 do
687 +  begin
688 +    if (Result <> '') and (Result[Length(Result)] <> LF) then
689 +      Result := Result + LineEnding + '-';
690 +    Result := Result + strpas(local_buffer);
691 +  end;
692 + end;
693 +
694   end.
695  
696  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines