ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/journaling/fbintf/IB.pas
(Generate patch)

Comparing ibx/trunk/fbintf/IB.pas (file contents):
Revision 287 by tony, Thu Apr 11 08:51:23 2019 UTC vs.
Revision 347 by tony, Mon Sep 20 22:08:20 2021 UTC

# Line 129 | Line 129 | uses
129    Classes,
130    {$IFDEF WINDOWS}Windows, {$ENDIF}
131    {$IFDEF FPC} Dynlibs, {$ENDIF}
132 <  SysUtils, DB, FBMessages, IBExternals;
132 >  SysUtils, DB, FBMessages, IBExternals, FmtBcd;
133  
134   const
135    {Interface version information}
136    FBIntf_Major = 1;
137 <  FBIntf_Minor = 1;
138 <  FBIntf_Release = 5;
139 <  FBIntf_Version = '1.1.5';
137 >  FBIntf_Minor = 3;
138 >  FBIntf_Release = 2;
139 >  FBIntf_Version = '1.3.2';
140 >
141 > const
142 >  {DPB, TPB and SPB Parameter Block Name Prefixes}
143 >  DPBPrefix = 'isc_dpb_';
144 >  TPBPrefix = 'isc_tpb_';
145 >
146 > const
147 >  {Time Zone ID constraint}
148 >  MaxOffsetTimeZoneID = 2879; {lower values represent a time zone offset between
149 >                               -23:59 and 23:59. Higher values are keys to the
150 >                               Time Zone database.}
151 >
152 >  TimeZoneID_GMT = 23*minsPerHour + 59;
153 >  decimillisecondsPerSecond = 10000;
154 >  TimeZoneDisplacementDelta = 60*23 + 59; {23:59 in minutes}
155  
156   {These include files are converted from the 'C' originals in the Firebird API
157   and define the various constants used by the API}
158  
159   {$I 'include/consts_pub.inc'}
160 + {$I 'include/dyn_consts.inc'}
161   {$I 'include/inf_pub.inc'}
162   {$I 'include/configkeys.inc'}
163 + {$I 'include/blr.inc'}
164  
165   {The following constants define the values return by calls to the GetSQLType
166   methods provided by several of the interfaces defined below.}
# Line 165 | Line 182 | const
182    SQL_TYPE_TIME                  =        560;
183    SQL_TYPE_DATE                  =        570;
184    SQL_INT64                      =        580;
185 +  SQL_TIMESTAMP_TZ_EX            =        32748;
186 +  SQL_TIME_TZ_EX                 =        32750;
187 +  SQL_INT128                     =        32752;
188    SQL_BOOLEAN                    =        32764;
189 +  SQL_TIMESTAMP_TZ               =        32754;
190 +  SQL_TIME_TZ                    =        32756;
191 +  SQL_DEC_FIXED                  =        32758;    {FB4 Beta 1 only}
192 +  SQL_DEC16                      =        32760;
193 +  SQL_DEC34                      =        32762;
194 +  SQL_NULL                       =        32766;
195    SQL_DATE                       =        SQL_TIMESTAMP;
196  
197   type
# Line 210 | Line 236 | type
236                    SQLGetSegment, SQLPutSegment,
237                    SQLExecProcedure, SQLStartTransaction,
238                    SQLCommit, SQLRollback,
239 <                  SQLSelectForUpdate, SQLSetGenerator);
239 >                  SQLSelectForUpdate, SQLSetGenerator,
240 >                  SQLSavePoint);
241  
242    TFBStatusCode = cardinal;
243    TByteArray = array of byte;
244 +  TFBTimeZoneID = ISC_USHORT;
245  
246    IFirebirdAPI = interface;
247    IAttachment = interface;
248    ITransaction = interface;
249 +  IStatement = interface;
250  
251    {The IParameterBlock interface provides the template for all parameter
252     block interfaces}
# Line 232 | Line 261 | type
261      property Items[index: integer]: _IItem read getItems; default;
262    end;
263  
264 +  IParameterBlockWithTypeNames<_IItem> = interface(IParameterBlock<_IItem>)
265 +    function AddByTypeName(ParamTypeName: AnsiString): _IItem;
266 +    function GetDPBParamTypeName(ParamType: byte): Ansistring; deprecated 'Use Get ParamTypeName';
267 +    function GetParamTypeName(ParamType: byte): Ansistring;
268 +  end;
269 +
270    {IParameterBlockItem is not used on its own but instead provides a base type for
271     different parameter block items }
272  
# Line 249 | Line 284 | type
284      property AsInteger: integer read getAsInteger write SetAsInteger;
285    end;
286  
287 +  IParameterBlockItemWithTypeName = interface(IParameterBlockItem)
288 +    function getParamTypeName: AnsiString;
289 +  end;
290  
291    {The IStatus interface provides access to error information, if any, returned
292     by the last API call. It can also be used to customise the error message
# Line 257 | Line 295 | type
295     This interface can be accessed from IFirebirdAPI.
296     }
297  
298 +   TIBDataBaseErrorMessage    = (ShowSQLCode,
299 +                                   ShowIBMessage,
300 +                                   ShowSQLMessage);
301 +
302 +   TIBDataBaseErrorMessages   = set of TIBDataBaseErrorMessage;
303 +
304 +   TStatusCode = long;
305 +
306    IStatus = interface
307      ['{34167722-af38-4831-b08a-93162d58ede3}']
308 <    function GetIBErrorCode: Long;
309 <    function Getsqlcode: Long;
308 >    function GetIBErrorCode: TStatusCode;
309 >    function Getsqlcode: TStatusCode;
310      function GetMessage: AnsiString;
311      function CheckStatusVector(ErrorCodes: array of TFBStatusCode): Boolean;
312      function GetIBDataBaseErrorMessages: TIBDataBaseErrorMessages;
# Line 283 | Line 329 | type
329      function GetSQLTypeName: AnsiString;
330      function GetScale: integer;
331      function GetSize: cardinal;
332 +    function GetCharSetWidth: integer;
333      function GetCharSetID: cardinal;
334      function GetTableName: AnsiString;
335      function GetColumnName: AnsiString;
# Line 321 | Line 368 | type
368      function GetAsBoolean(index: array of integer): boolean;
369      function GetAsCurrency(index: array of integer): Currency;
370      function GetAsInt64(index: array of integer): Int64;
371 <    function GetAsDateTime(index: array of integer): TDateTime;
371 >    function GetAsDateTime(index: array of integer): TDateTime; overload;
372 >    procedure GetAsDateTime(index: array of integer; var aDateTime: TDateTime; var dstOffset: smallint; var aTimezoneID: TFBTimeZoneID); overload;
373 >    procedure GetAsDateTime(index: array of integer; var aDateTime: TDateTime; var dstOffset: smallint; var aTimezone: AnsiString); overload;
374 >    procedure GetAsTime(index: array of integer; var aTime: TDateTime; var dstOffset: smallint; var aTimezoneID: TFBTimeZoneID; OnDate: TDateTime); overload;
375 >    procedure GetAsTime(index: array of integer; var aTime: TDateTime; var dstOffset: smallint; var aTimezone: AnsiString; OnDate: TDateTime); overload;
376 >    function GetAsUTCDateTime(index: array of integer): TDateTime;
377      function GetAsDouble(index: array of integer): Double;
378      function GetAsFloat(index: array of integer): Float;
379      function GetAsLong(index: array of integer): Long;
380      function GetAsShort(index: array of integer): Short;
381      function GetAsString(index: array of integer): AnsiString;
382      function GetAsVariant(index: array of integer): Variant;
383 +    function GetAsBCD(index: array of integer): tBCD;
384      procedure SetAsInteger(index: array of integer; AValue: integer);
385      procedure SetAsBoolean(index: array of integer; AValue: boolean);
386      procedure SetAsCurrency(index: array of integer; Value: Currency);
387      procedure SetAsInt64(index: array of integer; Value: Int64);
388      procedure SetAsDate(index: array of integer; Value: TDateTime);
389 +    procedure SetAsDateTime(index: array of integer; Value: TDateTime); overload;
390 +    procedure SetAsDateTime(index: array of integer; aValue: TDateTime; aTimeZoneID: TFBTimeZoneID); overload;
391 +    procedure SetAsDateTime(index: array of integer; aValue: TDateTime; aTimeZone: AnsiString); overload;
392 +    procedure SetAsTime(index: array of integer; Value: TDateTime); overload;
393 +    procedure SetAsTime(index: array of integer; aValue: TDateTime; OnDate: TDateTime; aTimeZoneID: TFBTimeZoneID); overload;
394 +    procedure SetAsTime(index: array of integer; aValue: TDateTime; OnDate: TDateTime; aTimeZone: AnsiString); overload;
395 +    procedure SetAsUTCDateTime(index: array of integer; aUTCTime: TDateTime);
396      procedure SetAsLong(index: array of integer; Value: Long);
337    procedure SetAsTime(index: array of integer; Value: TDateTime);
338    procedure SetAsDateTime(index: array of integer; Value: TDateTime);
397      procedure SetAsDouble(index: array of integer; Value: Double);
398      procedure SetAsFloat(index: array of integer; Value: Float);
399      procedure SetAsShort(index: array of integer; Value: Short);
400      procedure SetAsString(index: array of integer; Value: AnsiString);
401      procedure SetAsVariant(index: array of integer; Value: Variant);
402 +    procedure SetAsBcd(index: array of integer; aValue: tBCD);
403      procedure SetBounds(dim, UpperBound, LowerBound: integer);
404      function GetAttachment: IAttachment;
405      function GetTransaction: ITransaction;
# Line 413 | Line 472 | type
472  
473    TIBDateTimeFormats = (dfTimestamp, {SQL TIMESTAMP}
474                          dfDateTime,   {SQL DATETIME}
475 <                        dfTime);      {SQL TIME}
475 >                        dfTime,      {SQL TIME}
476 >                        dfTimestampTZ, {SQL_TIMESTAMP_TZ}
477 >                        dfTimeTZ);       {SQLTIME_TZ
478  
479    { IColumnMetaData }
480  
# Line 431 | Line 492 | type
492      function getScale: integer;
493      function getCharSetID: cardinal;
494      function getCodePage: TSystemCodePage;
495 +    function GetCharSetWidth: integer;
496      function getIsNullable: boolean;
497      function GetSize: cardinal;
498      function GetArrayMetaData: IArrayMetaData; {Valid only for Array SQL Type}
499      function GetBlobMetaData: IBlobMetaData; {Valid only for Blob SQL Type}
500      function GetDateTimeStrLength(DateTimeFormat: TIBDateTimeFormats): integer;
501 +    function GetStatement: IStatement;
502 +    function GetTransaction: ITransaction;
503      property Name: AnsiString read GetName;
504      property Size: cardinal read GetSize;
505      property SQLType: cardinal read GetSQLType;
# Line 477 | Line 541 | type
541  
542    ISQLData = interface(IColumnMetaData)
543      ['{3f493e31-7e3f-4606-a07c-b210b9e3619d}']
544 +    function GetStrDataLength: short;
545      function GetAsBoolean: boolean;
546      function GetAsCurrency: Currency;
547      function GetAsInt64: Int64;
548 <    function GetAsDateTime: TDateTime;
548 >    function GetAsDateTime: TDateTime; overload;
549 >    procedure GetAsDateTime(var aDateTime: TDateTime; var dstOffset: smallint; var aTimezoneID: TFBTimeZoneID); overload;
550 >    procedure GetAsDateTime(var aDateTime: TDateTime; var dstOffset: smallint; var aTimezone: AnsiString); overload;
551 >    procedure GetAsTime(var aTime: TDateTime; var dstOffset: smallint; var aTimezoneID: TFBTimeZoneID; OnDate: TDateTime); overload;
552 >    procedure GetAsTime(var aTime: TDateTime; var dstOffset: smallint; var aTimezone: AnsiString; OnDate: TDateTime); overload;
553 >    procedure GetAsTime(var aTime: TDateTime; var dstOffset: smallint; var aTimezoneID: TFBTimeZoneID); overload;
554 >    procedure GetAsTime(var aTime: TDateTime; var dstOffset: smallint; var aTimezone: AnsiString); overload;
555 >    function GetAsUTCDateTime: TDateTime;
556      function GetAsDouble: Double;
557      function GetAsFloat: Float;
558      function GetAsLong: Long;
# Line 493 | Line 565 | type
565      function GetAsBlob: IBlob; overload;
566      function GetAsBlob(BPB: IBPB): IBlob; overload;
567      function GetAsArray: IArray;
568 +    function GetAsBCD: tBCD;
569      property AsDate: TDateTime read GetAsDateTime;
570      property AsBoolean:boolean read GetAsBoolean;
571      property AsTime: TDateTime read GetAsDateTime;
# Line 510 | Line 583 | type
583      property AsVariant: Variant read GetAsVariant ;
584      property AsBlob: IBlob read GetAsBlob;
585      property AsArray: IArray read GetAsArray;
586 +    property AsBCD: tBCD read GetAsBCD;
587      property IsNull: Boolean read GetIsNull;
588      property Value: Variant read GetAsVariant;
589    end;
# Line 523 | Line 597 | type
597    IResults = interface
598      ['{e836b2bb-93d1-4bbf-a8eb-7ce535de3bb5}']
599     function getCount: integer;
600 +   function GetStatement: IStatement;
601     function GetTransaction: ITransaction;
602     function ByName(Idx: AnsiString): ISQLData;
603     function getSQLData(index: integer): ISQLData;
# Line 575 | Line 650 | type
650      function GetAsBoolean: boolean;
651      function GetAsCurrency: Currency;
652      function GetAsInt64: Int64;
653 <    function GetAsDateTime: TDateTime;
653 >    function GetAsDateTime: TDateTime; overload;
654 >    procedure GetAsDateTime(var aDateTime: TDateTime; var dstOffset: smallint; var aTimezoneID: TFBTimeZoneID); overload;
655 >    procedure GetAsDateTime(var aDateTime: TDateTime; var dstOffset: smallint; var aTimezone: AnsiString); overload;
656 >    procedure GetAsTime(var aTime: TDateTime; var dstOffset: smallint; var aTimezoneID: TFBTimeZoneID; OnDate: TDateTime); overload;
657 >    procedure GetAsTime(var aTime: TDateTime; var dstOffset: smallint; var aTimezone: AnsiString; OnDate: TDateTime); overload;
658 >    procedure GetAsTime(var aTime: TDateTime; var dstOffset: smallint; var aTimezoneID: TFBTimeZoneID); overload;
659 >    procedure GetAsTime(var aTime: TDateTime; var dstOffset: smallint; var aTimezone: AnsiString); overload;
660 >    function GetAsUTCDateTime: TDateTime;
661      function GetAsDouble: Double;
662      function GetAsFloat: Float;
663      function GetAsLong: Long;
# Line 587 | Line 669 | type
669      function GetAsVariant: Variant;
670      function GetAsBlob: IBlob;
671      function GetAsArray: IArray;
672 +    function GetAsBCD: tBCD;
673 +    function GetStatement: IStatement;
674 +    function GetTransaction: ITransaction;
675      procedure Clear;
676      function GetModified: boolean;
677      procedure SetAsBoolean(AValue: boolean);
# Line 594 | Line 679 | type
679      procedure SetAsInt64(aValue: Int64);
680      procedure SetAsDate(aValue: TDateTime);
681      procedure SetAsLong(aValue: Long);
682 <    procedure SetAsTime(aValue: TDateTime);
683 <    procedure SetAsDateTime(aValue: TDateTime);
682 >    procedure SetAsTime(aValue: TDateTime); overload;
683 >    procedure SetAsTime(aValue: TDateTime; OnDate: TDateTime; aTimeZoneID: TFBTimeZoneID); overload;
684 >    procedure SetAsTime(aValue: TDateTime; OnDate: TDateTime; aTimeZone: AnsiString); overload;
685 >    procedure SetAsTime(aValue: TDateTime; aTimeZoneID: TFBTimeZoneID); overload;
686 >    procedure SetAsTime(aValue: TDateTime; aTimeZone: AnsiString); overload;
687 >    procedure SetAsDateTime(aValue: TDateTime); overload;
688 >    procedure SetAsDateTime(aValue: TDateTime; aTimeZoneID: TFBTimeZoneID); overload;
689 >    procedure SetAsDateTime(aValue: TDateTime; aTimeZone: AnsiString); overload;
690 >    procedure SetAsUTCDateTime(aUTCTime: TDateTime);
691      procedure SetAsDouble(aValue: Double);
692      procedure SetAsFloat(aValue: Float);
693      procedure SetAsPointer(aValue: Pointer);
# Line 607 | Line 699 | type
699      procedure SetAsArray(anArray: IArray);
700      procedure SetAsQuad(aValue: TISC_QUAD);
701      procedure SetCharSetID(aValue: cardinal);
702 +    procedure SetAsBcd(aValue: tBCD);
703      property AsDate: TDateTime read GetAsDateTime write SetAsDate;
704      property AsBoolean:boolean read GetAsBoolean write SetAsBoolean;
705      property AsTime: TDateTime read GetAsDateTime write SetAsTime;
# Line 623 | Line 716 | type
716      property AsVariant: Variant read GetAsVariant write SetAsVariant;
717      property AsBlob: IBlob read GetAsBlob write SetAsBlob;
718      property AsArray: IArray read GetAsArray write SetAsArray;
719 +    property AsBCD: tBCD read GetAsBCD write SetAsBCD;
720      property AsQuad: TISC_QUAD read GetAsQuad write SetAsQuad;
721      property Value: Variant read GetAsVariant write SetAsVariant;
722      property IsNull: Boolean read GetIsNull write SetIsNull;
# Line 656 | Line 750 | type
750  
751    TPerfCounters = array[TPerfStats] of Int64;
752  
753 +  {Batch Query Execution Support}
754 +
755 +  TBatchCompletionState = (bcExecuteFailed, bcSuccessNoInfo, bcNoMoreErrors);
756 +
757 +  IBatchCompletion = interface
758 +  ['{9bc3d49d-16d9-4606-94e5-ee987103ad92}']
759 +    function getTotalProcessed: cardinal;
760 +    function getState(updateNo: cardinal): TBatchCompletionState;
761 +    function getStatusMessage(updateNo: cardinal): AnsiString;
762 +    function getUpdated: integer;
763 +    function getErrorStatus(var RowNo: integer; var status: IStatus): boolean;
764 +    end;
765 +
766    {The IStatement interface provides access to an SQL Statement once it has been
767     initially prepared. The interface is returned from the IAttachment interface.
768     }
# Line 667 | Line 774 | type
774      function GetPlan: AnsiString;
775      function GetRowsAffected(var SelectCount, InsertCount, UpdateCount, DeleteCount: integer): boolean;
776      function GetSQLStatementType: TIBSQLStatementTypes;
777 +    function GetSQLStatementTypeName: AnsiString;
778      function GetSQLText: AnsiString;
779      function GetProcessedSQLText: AnsiString;
780      function GetSQLDialect: integer;
781      function IsPrepared: boolean;
782 +    function HasBatchMode: boolean;
783 +    function IsInBatchMode: boolean;
784      procedure Prepare(aTransaction: ITransaction=nil);
785      function Execute(aTransaction: ITransaction=nil): IResults;
786      function OpenCursor(aTransaction: ITransaction=nil): IResultSet;
# Line 679 | Line 789 | type
789      procedure SetRetainInterfaces(aValue: boolean);
790      procedure EnableStatistics(aValue: boolean);
791      function GetPerfStatistics(var stats: TPerfCounters): boolean;
792 +    {IBatch interface support}
793 +    procedure AddToBatch;
794 +    function ExecuteBatch(aTransaction: ITransaction=nil): IBatchCompletion;
795 +    procedure CancelBatch;
796 +    function GetBatchCompletion: IBatchCompletion;
797 +    function GetBatchRowLimit: integer;
798 +    procedure SetBatchRowLimit(aLimit: integer);
799 +    {Stale Reference Check}
800 +    procedure SetStaleReferenceChecks(Enable:boolean); {default true}
801 +    function GetStaleReferenceChecks: boolean;
802 +
803      property MetaData: IMetaData read GetMetaData;
804      property SQLParams: ISQLParams read GetSQLParams;
805      property SQLStatementType: TIBSQLStatementTypes read GetSQLStatementType;
# Line 695 | Line 816 | type
816     found in the Interbase 6.0 API Guide.
817    }
818  
819 <  ITPBItem = interface(IParameterBlockItem)
819 >  ITPBItem = interface(IParameterBlockItemWithTypeName)
820      ['{544c1f2b-7c12-4a87-a4a5-face7ea72671}']
821 +    function getParamTypeName: AnsiString;
822    end;
823  
824 <  ITPB = interface(IParameterBlock<ITPBItem>)
824 >  ITPB = interface(IParameterBlockWithTypeNames<ITPBItem>)
825      ['{7369b0ff-defe-437b-81fe-19b211d42d25}']
826    end;
827  
# Line 765 | Line 887 | type
887      function GetAttachment: IAttachment;
888    end;
889  
890 +  TTZTextOptions = (tzOffset,      {Time Zone Rendered as an offset to GMT}
891 +                    tzGMT,         {No Time Zone. Time part is always rendered in GMT}
892 +                    tzOriginalID); {Time Zone shown as originally entered}
893 +
894 +  {The ITimeZoneServices interface provides access to the time zone database
895 +   used for the attachment. It may be used in support of TIMESTAMP WITH TIME ZONE
896 +   and TIME WITH TIME ZONE data types.}
897 +
898 +  ITimeZoneServices = interface
899 +    ['{163821f5-ebef-42b9-ac60-8ac4b5c09954}']
900 +    {utility functions}
901 +    function TimeZoneID2TimeZoneName(aTimeZoneID: TFBTimeZoneID): AnsiString;
902 +    function TimeZoneName2TimeZoneID(aTimeZone: AnsiString): TFBTimeZoneID;
903 +    function LocalTimeToGMT(aLocalTime: TDateTime; aTimeZone: AnsiString): TDateTime; overload;
904 +    function LocalTimeToGMT(aLocalTime: TDateTime; aTimeZoneID: TFBTimeZoneID): TDateTime; overload;
905 +    function GMTToLocalTime(aGMTTime: TDateTime; aTimeZone: AnsiString): TDateTime; overload;
906 +    function GMTToLocalTime(aGMTTime: TDateTime; aTimeZoneID: TFBTimeZoneID): TDateTime; overload;
907 +    function GetEffectiveOffsetMins(aLocalTime: TDateTime; aTimeZone: AnsiString): integer; overload;
908 +    function GetEffectiveOffsetMins(aLocalTime: TDateTime; aTimeZoneID: TFBTimeZoneID): integer; overload;
909 +
910 +    {Time Zone DB Information}
911 +    function UsingRemoteTZDB: boolean;
912 +    procedure SetUseLocalTZDB(useLocalTZDB: boolean);
913 +    function GetLocalTimeZoneName: AnsiString;
914 +    function GetLocalTimeZoneID: TFBTimeZoneID;
915 +    procedure GetTimeZoneInfo(aTimeZone: AnsiString; OnDate: TDateTime;
916 +                           var ZoneOffset, DSTOffset, EffectiveOffset: integer);
917 +    {Configurable Options}
918 +    function GetTimeTZDate: TDateTime;
919 +    procedure SetTimeTZDate(aDate: TDateTime);
920 +    function GetTZTextOption: TTZTextOptions;
921 +    procedure SetTZTextOption(aOptionValue: TTZTextOptions);
922 +  end;
923 +
924    {The IDBInformation Interface.
925  
926     An IDBInformation interface is returned by the  IAttachment GetDBInformation
# Line 793 | Line 949 | type
949      function getSize: integer;
950      procedure getRawBytes(var Buffer);
951      function getAsString: AnsiString;
952 <    function getAsInteger: integer;
952 >    function getAsInteger: int64;
953      procedure DecodeIDCluster(var ConnectionType: integer; var DBFileName, DBSiteName: AnsiString);
954      function getAsBytes: TByteArray;
955      function getAsDateTime: TDateTime;
# Line 805 | Line 961 | type
961      function GetCount: integer;
962      function GetItem(index: integer): IDBInfoItem;
963      function Find(ItemType: byte): IDBInfoItem;
964 <    property AsInteger: integer read getAsInteger;
964 >    property AsInteger: int64 read getAsInteger;
965      property AsString: AnsiString read GetAsString;
966      property Count: integer read GetCount;
967      property Items[index: integer]: IDBInfoItem read getItem; default;
# Line 848 | Line 1004 | type
1004     found in the Interbase 6.0 API Guide.
1005     }
1006  
1007 <  IDPBItem = interface(IParameterBlockItem)
1007 >  IDPBItem = interface(IParameterBlockItemWithTypeName)
1008      ['{123d4ad0-087a-4cd1-a344-1b3d03b30673}']
1009    end;
1010  
1011 <  IDPB = interface(IParameterBlock<IDPBItem>)
1012 <    ['{e676067b-1cf4-4eba-9256-9724f57e0d16}']
1013 <  end;
1011 >   IDPB = interface(IParameterBlockWithTypeNames<IDPBItem>)
1012 >     ['{e676067b-1cf4-4eba-9256-9724f57e0d16}']
1013 >   end;
1014  
1015    {The IAttachment interface provides access to a Database Connection. It may be
1016     used to:
# Line 936 | Line 1092 | type
1092      function CreateBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BPB: IBPB=nil): IBlob; overload;
1093      function CreateBlob(transaction: ITransaction; BlobMetaData: IBlobMetaData; BPB: IBPB=nil): IBlob; overload;
1094      function CreateBlob(transaction: ITransaction; SubType: integer; CharSetID: cardinal=0; BPB: IBPB=nil): IBlob; overload;
1095 <    function OpenBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob;
1095 >    function OpenBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob; overload;
1096 >    function OpenBlob(transaction: ITransaction; BlobMetaData: IBlobMetaData; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob;  overload;
1097 >    function GetInlineBlobLimit: integer;
1098 >    procedure SetInlineBlobLimit(limit: integer);
1099  
1100      {Array - may use to open existing arrays. However, ISQLData.AsArray is preferred}
1101  
1102 <    function OpenArray(transaction: ITransaction; RelationName, ColumnName: AnsiString; ArrayID: TISC_QUAD): IArray;
1102 >    function OpenArray(transaction: ITransaction; RelationName, ColumnName: AnsiString; ArrayID: TISC_QUAD): IArray; overload;
1103 >    function OpenArray(transaction: ITransaction; ArrayMetaData: IArrayMetaData; ArrayID: TISC_QUAD): IArray; overload;
1104      function CreateArray(transaction: ITransaction; RelationName, ColumnName: AnsiString): IArray; overload;
1105      function CreateArray(transaction: ITransaction; ArrayMetaData: IArrayMetaData): IArray; overload;
1106      function CreateArrayMetaData(SQLType: cardinal; tableName: AnsiString; columnName: AnsiString;
# Line 962 | Line 1122 | type
1122      function GetODSMinorVersion: integer;
1123      procedure getFBVersion(version: TStrings);
1124      function HasActivity: boolean;
1125 +    function HasDecFloatSupport: boolean;
1126 +    function HasBatchMode: boolean;
1127  
1128      {Character Sets}
1129      function HasDefaultCharSet: boolean;
# Line 973 | Line 1135 | type
1135      function CharSetWidth(CharSetID: integer; var Width: integer): boolean;
1136      procedure RegisterCharSet(CharSetName: AnsiString; CodePage: TSystemCodePage;
1137        AllowReverseLookup:boolean; out CharSetID: integer);
1138 <  end;
1138 >
1139 >    {Time Zone Database}
1140 >    function GetTimeZoneServices: ITimeZoneServices;
1141 >    function HasTimeZoneSupport: boolean;
1142 > end;
1143  
1144    TProtocolAll = (TCP, SPX, NamedPipe, Local, inet, inet4, inet6, wnet, xnet, unknownProtocol);
1145    TProtocol = TCP..xnet;
# Line 990 | Line 1156 | type
1156  
1157    }
1158  
1159 <  ISPBItem = interface(IParameterBlockItem)
1159 >  ISPBItem = interface(IParameterBlockItemWithTypeName)
1160      ['{5d08ae2b-4519-41bd-8b40-97cd451c3f6a}']
1161    end;
1162  
1163 <  ISPB = interface(IParameterBlock<ISPBItem>)
1163 >  ISPB = interface(IParameterBlockWithTypeNames<ISPBItem>)
1164      ['{2c5836fd-41ed-4426-9b7d-5af580ec2659}']
1165    end;
1166  
# Line 1054 | Line 1220 | type
1220      function getSize: integer;
1221      procedure getRawBytes(var Buffer);
1222      function getAsString: AnsiString;
1223 <    function getAsInteger: integer;
1223 >    function getAsInteger: int64;
1224      function getAsByte: byte;
1225      function CopyTo(stream: TStream; count: integer): integer;
1226      property AsString: AnsiString read getAsString;
1227 <    property AsInteger: integer read getAsInteger;
1227 >    property AsInteger: int64 read getAsInteger;
1228      property AsByte: byte read getAsByte;
1229    end;
1230  
# Line 1128 | Line 1294 | type
1294     The interface is returned by the FirebirdAPI function.
1295    }
1296  
1297 +  { IFirebirdAPI }
1298 +
1299    IFirebirdAPI = interface
1300      ['{edeee691-c8d3-4dcf-a780-cd7e432821d5}']
1301      {Database connections}
# Line 1154 | Line 1322 | type
1322      function HasRollbackRetaining: boolean;
1323      function IsEmbeddedServer: boolean;
1324      function GetImplementationVersion: AnsiString;
1325 +    function GetClientMajor: integer;
1326 +    function GetClientMinor: integer;
1327 +    function HasDecFloatSupport: boolean;
1328 +    function HasLocalTZDB: boolean;
1329 +    function HasTimeZoneSupport: boolean;
1330 +    function HasExtendedTZSupport: boolean;
1331  
1332      {Firebird 3 API}
1333      function HasMasterIntf: boolean;
1334 <    function GetIMaster: TObject;
1334 >    function GetIMaster: TObject;  deprecated 'Use FirebirdAPI.QueryInterface and FBClientLib.pas IFBIMasterProvider instead';
1335      function GetFBLibrary: IFirebirdLibrary;
1336   end;
1337  
# Line 1193 | Line 1367 | type
1367     {IB Client Exceptions}
1368     EIBClientError = class(EIBError);
1369  
1370 < {IBError is used internally and by IBX to throw an EIBClientError}
1371 <
1198 < procedure IBError(ErrMess: TIBClientError; const Args: array of const);
1370 >   {Used to explicitly report a Batch Buffer overflow}
1371 >   EIBBatchBufferOverflow = class(EIBError);
1372  
1373   {The Firebird API function is used to access the IFirebirdAPI interface.
1374  
# Line 1206 | Line 1379 | procedure IBError(ErrMess: TIBClientErro
1379   function FirebirdAPI: IFirebirdAPI;
1380  
1381   {IBX support functions. Probably best ignored i.e. always used the FirebirdAPI
1382 < functino to load the library and check if it's loaded.}
1382 > function to load the library and check if it's loaded.}
1383  
1384   function TryIBLoad: Boolean;
1385   procedure CheckIBLoaded;
# Line 1217 | Line 1390 | procedure CheckIBLoaded;
1390  
1391   function LoadFBLibrary(aLibPathName: string): IFirebirdLibrary;
1392  
1393 +
1394   implementation
1395  
1396   uses FBClientAPI
# Line 1324 | Line 1498 | begin
1498    FIBErrorCode := AIBErrorCode;
1499   end;
1500  
1327 procedure IBError(ErrMess: TIBClientError; const Args: array of const);
1328 begin
1329  raise EIBClientError.Create(Ord(ErrMess),
1330                              Format(GetErrorMessage(ErrMess), Args));
1331 end;
1501  
1502   initialization
1503    FDefaultFBLibrary := nil;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines