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