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} |
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 |
|
|
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; |
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} |
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; |
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); |
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 |
|
|