134 |
|
const |
135 |
|
{Interface version information} |
136 |
|
FBIntf_Major = 1; |
137 |
< |
FBIntf_Minor = 2; |
138 |
< |
FBIntf_Release = 1; |
139 |
< |
FBIntf_Version = '1.2.1'; |
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} |
263 |
|
|
264 |
|
IParameterBlockWithTypeNames<_IItem> = interface(IParameterBlock<_IItem>) |
265 |
|
function AddByTypeName(ParamTypeName: AnsiString): _IItem; |
266 |
< |
function GetDPBParamTypeName(ParamType: byte): Ansistring; |
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 |
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; |
614 |
|
} |
615 |
|
IResultSet = interface(IResults) |
616 |
|
['{0ae4979b-7857-4e8c-8918-ec6f155b51a0}'] |
617 |
< |
function FetchNext: boolean; |
617 |
> |
function FetchNext: boolean; {fetch next record} |
618 |
> |
function FetchPrior: boolean; {fetch previous record} |
619 |
> |
function FetchFirst:boolean; {fetch first record} |
620 |
> |
function FetchLast: boolean; {fetch last record} |
621 |
> |
function FetchAbsolute(position: Integer): boolean; {fetch record by its absolute position in result set} |
622 |
> |
function FetchRelative(offset: Integer): boolean; {fetch record by position relative to current} |
623 |
|
function GetCursorName: AnsiString; |
624 |
+ |
function IsBof: boolean; |
625 |
|
function IsEof: boolean; |
626 |
|
procedure Close; |
627 |
|
end; |
628 |
|
|
629 |
|
{The ISQLParam interface is used to provide access to each parameter in a |
630 |
< |
parametised SQL Statement. It subclasses IColumnMetaData and this part of |
622 |
< |
the interface may be used to access information on the expected SQL Type, etc. |
623 |
< |
|
624 |
< |
It also subclasses ISQLData and this part of the interface may be used to access |
625 |
< |
current values for each parameter. |
626 |
< |
|
627 |
< |
Otherwise, the interface comprises the Setter Methods and properties used to |
630 |
> |
parametised SQL Statement. The interface comprises the Setter Methods and properties used to |
631 |
|
set the value of each parameter. |
632 |
|
|
633 |
|
Automatic conversion is provided to and from strings. That is GetAsString and |
634 |
|
SetAsString are safe to use for sql types other than boolean - provided automatic |
635 |
|
conversion is possible. |
636 |
+ |
|
637 |
+ |
ISQLParam is subclassed from the IParamMetaData interface. This interface provides |
638 |
+ |
access to the parameter metadata. This metadata is mutable and can change after |
639 |
+ |
a parameter is set to a given value. This is acceptable as long as the parameter |
640 |
+ |
metadata is type compatible with the underlying column metadata and hence the |
641 |
+ |
parameter value can be converted by Firebird into a value acceptable by the |
642 |
+ |
underlying column. The column metadata, which is unmutable, can be obtained |
643 |
+ |
by the ISQLParam.getColMetadata interface. When a statement is prepared, the |
644 |
+ |
parameter metadata is always initialised to the column metadata. |
645 |
|
} |
646 |
|
|
647 |
< |
ISQLParam = interface |
648 |
< |
['{b22b4578-6d41-4807-a9a9-d2ec8d1d5a14}'] |
637 |
< |
function GetIndex: integer; |
647 |
> |
IParamMetaData = interface |
648 |
> |
['{4e148c4e-2d48-4991-a263-f66eca05c6aa}'] |
649 |
|
function GetSQLType: cardinal; |
650 |
|
function GetSQLTypeName: AnsiString; |
651 |
|
function getSubtype: integer; |
641 |
– |
function getName: AnsiString; |
652 |
|
function getScale: integer; |
653 |
|
function getCharSetID: cardinal; |
654 |
|
function getCodePage: TSystemCodePage; |
655 |
|
function getIsNullable: boolean; |
656 |
|
function GetSize: cardinal; |
657 |
+ |
property SQLType: cardinal read GetSQLType; |
658 |
+ |
end; |
659 |
+ |
|
660 |
+ |
ISQLParam = interface(IParamMetaData) |
661 |
+ |
['{b22b4578-6d41-4807-a9a9-d2ec8d1d5a14}'] |
662 |
+ |
function getColMetadata: IParamMetaData; |
663 |
+ |
function GetIndex: integer; |
664 |
+ |
function getName: AnsiString; |
665 |
|
function GetAsBoolean: boolean; |
666 |
|
function GetAsCurrency: Currency; |
667 |
|
function GetAsInt64: Int64; |
738 |
|
property IsNullable: Boolean read GetIsNullable; |
739 |
|
property Modified: Boolean read getModified; |
740 |
|
property Name: AnsiString read GetName; |
723 |
– |
property SQLType: cardinal read GetSQLType; |
741 |
|
end; |
742 |
|
|
743 |
|
{ |
764 |
|
|
765 |
|
TPerfCounters = array[TPerfStats] of Int64; |
766 |
|
|
767 |
+ |
{Batch Query Execution Support} |
768 |
+ |
|
769 |
+ |
TBatchCompletionState = (bcExecuteFailed, bcSuccessNoInfo, bcNoMoreErrors); |
770 |
+ |
|
771 |
+ |
IBatchCompletion = interface |
772 |
+ |
['{9bc3d49d-16d9-4606-94e5-ee987103ad92}'] |
773 |
+ |
function getTotalProcessed: cardinal; |
774 |
+ |
function getState(updateNo: cardinal): TBatchCompletionState; |
775 |
+ |
function getStatusMessage(updateNo: cardinal): AnsiString; |
776 |
+ |
function getUpdated: integer; |
777 |
+ |
function getErrorStatus(var RowNo: integer; var status: IStatus): boolean; |
778 |
+ |
end; |
779 |
+ |
|
780 |
|
{The IStatement interface provides access to an SQL Statement once it has been |
781 |
|
initially prepared. The interface is returned from the IAttachment interface. |
782 |
|
} |
788 |
|
function GetPlan: AnsiString; |
789 |
|
function GetRowsAffected(var SelectCount, InsertCount, UpdateCount, DeleteCount: integer): boolean; |
790 |
|
function GetSQLStatementType: TIBSQLStatementTypes; |
791 |
+ |
function GetSQLStatementTypeName: AnsiString; |
792 |
|
function GetSQLText: AnsiString; |
793 |
|
function GetProcessedSQLText: AnsiString; |
794 |
|
function GetSQLDialect: integer; |
795 |
|
function IsPrepared: boolean; |
796 |
< |
procedure Prepare(aTransaction: ITransaction=nil); |
796 |
> |
function HasBatchMode: boolean; |
797 |
> |
function IsInBatchMode: boolean; |
798 |
> |
procedure Prepare(aTransaction: ITransaction=nil); overload; |
799 |
> |
procedure Prepare(CursorName: AnsiString; aTransaction: ITransaction=nil); overload; |
800 |
|
function Execute(aTransaction: ITransaction=nil): IResults; |
801 |
< |
function OpenCursor(aTransaction: ITransaction=nil): IResultSet; |
801 |
> |
function OpenCursor(aTransaction: ITransaction=nil): IResultSet; overload; |
802 |
> |
function OpenCursor(Scrollable: boolean; aTransaction: ITransaction=nil): IResultSet; overload; |
803 |
|
function GetAttachment: IAttachment; |
804 |
|
function GetTransaction: ITransaction; |
805 |
|
procedure SetRetainInterfaces(aValue: boolean); |
806 |
|
procedure EnableStatistics(aValue: boolean); |
807 |
|
function GetPerfStatistics(var stats: TPerfCounters): boolean; |
808 |
+ |
{IBatch interface support} |
809 |
+ |
procedure AddToBatch; |
810 |
+ |
function ExecuteBatch(aTransaction: ITransaction=nil): IBatchCompletion; |
811 |
+ |
procedure CancelBatch; |
812 |
+ |
function GetBatchCompletion: IBatchCompletion; |
813 |
+ |
function GetBatchRowLimit: integer; |
814 |
+ |
procedure SetBatchRowLimit(aLimit: integer); |
815 |
+ |
{Stale Reference Check} |
816 |
+ |
procedure SetStaleReferenceChecks(Enable:boolean); {default true} |
817 |
+ |
function GetStaleReferenceChecks: boolean; |
818 |
+ |
|
819 |
|
property MetaData: IMetaData read GetMetaData; |
820 |
|
property SQLParams: ISQLParams read GetSQLParams; |
821 |
|
property SQLStatementType: TIBSQLStatementTypes read GetSQLStatementType; |
965 |
|
function getSize: integer; |
966 |
|
procedure getRawBytes(var Buffer); |
967 |
|
function getAsString: AnsiString; |
968 |
< |
function getAsInteger: integer; |
968 |
> |
function getAsInteger: int64; |
969 |
|
procedure DecodeIDCluster(var ConnectionType: integer; var DBFileName, DBSiteName: AnsiString); |
970 |
|
function getAsBytes: TByteArray; |
971 |
|
function getAsDateTime: TDateTime; |
977 |
|
function GetCount: integer; |
978 |
|
function GetItem(index: integer): IDBInfoItem; |
979 |
|
function Find(ItemType: byte): IDBInfoItem; |
980 |
< |
property AsInteger: integer read getAsInteger; |
980 |
> |
property AsInteger: int64 read getAsInteger; |
981 |
|
property AsString: AnsiString read GetAsString; |
982 |
|
property Count: integer read GetCount; |
983 |
|
property Items[index: integer]: IDBInfoItem read getItem; default; |
1075 |
|
function ExecuteSQL(transaction: ITransaction; sql: AnsiString; SQLDialect: integer; params: array of const): IResults; overload; |
1076 |
|
function ExecuteSQL(TPB: array of byte; sql: AnsiString; params: array of const): IResults; overload; |
1077 |
|
function ExecuteSQL(transaction: ITransaction; sql: AnsiString; params: array of const): IResults; overload; |
1032 |
– |
function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IResultSet; overload; |
1078 |
|
function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; |
1079 |
+ |
Scrollable: boolean=false): IResultSet; overload; |
1080 |
+ |
function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; |
1081 |
+ |
params: array of const): IResultSet; overload; |
1082 |
+ |
function OpenCursor(transaction: ITransaction; sql: AnsiString; Scrollable: boolean=false): IResultSet; overload; |
1083 |
+ |
function OpenCursor(transaction: ITransaction; sql: AnsiString; Scrollable: boolean; |
1084 |
|
params: array of const): IResultSet; overload; |
1035 |
– |
function OpenCursor(transaction: ITransaction; sql: AnsiString): IResultSet; overload; |
1085 |
|
function OpenCursor(transaction: ITransaction; sql: AnsiString; |
1086 |
|
params: array of const): IResultSet; overload; |
1087 |
< |
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IResultSet; overload; |
1087 |
> |
function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; Scrollable: boolean; |
1088 |
> |
params: array of const): IResultSet; overload; |
1089 |
> |
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; |
1090 |
> |
Scrollable: boolean=false): IResultSet; overload; |
1091 |
|
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; |
1092 |
|
params: array of const): IResultSet; overload; |
1093 |
< |
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString): IResultSet; overload; |
1093 |
> |
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; Scrollable: boolean; |
1094 |
> |
params: array of const): IResultSet; overload; |
1095 |
> |
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; Scrollable: boolean=false): IResultSet; overload; |
1096 |
|
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; |
1097 |
|
params: array of const): IResultSet; overload; |
1098 |
< |
function OpenCursorAtStart(sql: AnsiString): IResultSet; overload; |
1098 |
> |
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; Scrollable: boolean; |
1099 |
> |
params: array of const): IResultSet; overload; |
1100 |
> |
function OpenCursorAtStart(sql: AnsiString; Scrollable: boolean=false): IResultSet; overload; |
1101 |
> |
function OpenCursorAtStart(sql: AnsiString; Scrollable: boolean; |
1102 |
> |
params: array of const): IResultSet; overload; |
1103 |
|
function OpenCursorAtStart(sql: AnsiString; |
1104 |
|
params: array of const): IResultSet; overload; |
1105 |
< |
function Prepare(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IStatement; overload; |
1106 |
< |
function Prepare(transaction: ITransaction; sql: AnsiString): IStatement; overload; |
1105 |
> |
function Prepare(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; CursorName: AnsiString=''): IStatement; overload; |
1106 |
> |
function Prepare(transaction: ITransaction; sql: AnsiString; CursorName: AnsiString=''): IStatement; overload; |
1107 |
|
function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString; |
1108 |
|
aSQLDialect: integer; GenerateParamNames: boolean=false; |
1109 |
< |
CaseSensitiveParams: boolean = false): IStatement; overload; |
1109 |
> |
CaseSensitiveParams: boolean = false; CursorName: AnsiString=''): IStatement; overload; |
1110 |
|
function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString; |
1111 |
|
GenerateParamNames: boolean=false; |
1112 |
< |
CaseSensitiveParams: boolean = false): IStatement; overload; |
1112 |
> |
CaseSensitiveParams: boolean = false; CursorName: AnsiString=''): IStatement; overload; |
1113 |
|
|
1114 |
|
{Events} |
1115 |
|
function GetEventHandler(Events: TStrings): IEvents; overload; |
1122 |
|
function CreateBlob(transaction: ITransaction; SubType: integer; CharSetID: cardinal=0; BPB: IBPB=nil): IBlob; overload; |
1123 |
|
function OpenBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob; overload; |
1124 |
|
function OpenBlob(transaction: ITransaction; BlobMetaData: IBlobMetaData; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob; overload; |
1125 |
+ |
function GetInlineBlobLimit: integer; |
1126 |
+ |
procedure SetInlineBlobLimit(limit: integer); |
1127 |
|
|
1128 |
|
{Array - may use to open existing arrays. However, ISQLData.AsArray is preferred} |
1129 |
|
|
1151 |
|
procedure getFBVersion(version: TStrings); |
1152 |
|
function HasActivity: boolean; |
1153 |
|
function HasDecFloatSupport: boolean; |
1154 |
+ |
function HasBatchMode: boolean; |
1155 |
|
|
1156 |
|
{Character Sets} |
1157 |
|
function HasDefaultCharSet: boolean; |
1248 |
|
function getSize: integer; |
1249 |
|
procedure getRawBytes(var Buffer); |
1250 |
|
function getAsString: AnsiString; |
1251 |
< |
function getAsInteger: integer; |
1251 |
> |
function getAsInteger: int64; |
1252 |
|
function getAsByte: byte; |
1253 |
|
function CopyTo(stream: TStream; count: integer): integer; |
1254 |
|
property AsString: AnsiString read getAsString; |
1255 |
< |
property AsInteger: integer read getAsInteger; |
1255 |
> |
property AsInteger: int64 read getAsInteger; |
1256 |
|
property AsByte: byte read getAsByte; |
1257 |
|
end; |
1258 |
|
|
1356 |
|
function HasLocalTZDB: boolean; |
1357 |
|
function HasTimeZoneSupport: boolean; |
1358 |
|
function HasExtendedTZSupport: boolean; |
1359 |
+ |
function HasScollableCursors: boolean; |
1360 |
|
|
1361 |
|
{Firebird 3 API} |
1362 |
|
function HasMasterIntf: boolean; |
1396 |
|
{IB Client Exceptions} |
1397 |
|
EIBClientError = class(EIBError); |
1398 |
|
|
1399 |
+ |
{Used to explicitly report a Batch Buffer overflow} |
1400 |
+ |
EIBBatchBufferOverflow = class(EIBError); |
1401 |
+ |
|
1402 |
|
{The Firebird API function is used to access the IFirebirdAPI interface. |
1403 |
|
|
1404 |
|
It will load the Firebird Client Library if this is not already loaded and |