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; |
621 |
|
end; |
622 |
|
|
623 |
|
{The ISQLParam interface is used to provide access to each parameter in a |
624 |
< |
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 |
624 |
> |
parametised SQL Statement. The interface comprises the Setter Methods and properties used to |
625 |
|
set the value of each parameter. |
626 |
|
|
627 |
|
Automatic conversion is provided to and from strings. That is GetAsString and |
628 |
|
SetAsString are safe to use for sql types other than boolean - provided automatic |
629 |
|
conversion is possible. |
630 |
+ |
|
631 |
+ |
ISQLParam is subclassed from the IParamMetaData interface. This interface provides |
632 |
+ |
access to the parameter metadata. This metadata is mutable and can change after |
633 |
+ |
a parameter is set to a given value. This is acceptable as long as the parameter |
634 |
+ |
metadata is type compatible with the underlying column metadata and hence the |
635 |
+ |
parameter value can be converted by Firebird into a value acceptable by the |
636 |
+ |
underlying column. The column metadata, which is unmutable, can be obtained |
637 |
+ |
by the ISQLParam.getColMetadata interface. When a statement is prepared, the |
638 |
+ |
parameter metadata is always initialised to the column metadata. |
639 |
|
} |
640 |
|
|
641 |
< |
ISQLParam = interface |
642 |
< |
['{b22b4578-6d41-4807-a9a9-d2ec8d1d5a14}'] |
637 |
< |
function GetIndex: integer; |
641 |
> |
IParamMetaData = interface |
642 |
> |
['{4e148c4e-2d48-4991-a263-f66eca05c6aa}'] |
643 |
|
function GetSQLType: cardinal; |
644 |
|
function GetSQLTypeName: AnsiString; |
645 |
|
function getSubtype: integer; |
641 |
– |
function getName: AnsiString; |
646 |
|
function getScale: integer; |
647 |
|
function getCharSetID: cardinal; |
648 |
|
function getCodePage: TSystemCodePage; |
649 |
|
function getIsNullable: boolean; |
650 |
|
function GetSize: cardinal; |
651 |
+ |
property SQLType: cardinal read GetSQLType; |
652 |
+ |
end; |
653 |
+ |
|
654 |
+ |
ISQLParam = interface(IParamMetaData) |
655 |
+ |
['{b22b4578-6d41-4807-a9a9-d2ec8d1d5a14}'] |
656 |
+ |
function getColMetadata: IParamMetaData; |
657 |
+ |
function GetIndex: integer; |
658 |
+ |
function getName: AnsiString; |
659 |
|
function GetAsBoolean: boolean; |
660 |
|
function GetAsCurrency: Currency; |
661 |
|
function GetAsInt64: Int64; |
732 |
|
property IsNullable: Boolean read GetIsNullable; |
733 |
|
property Modified: Boolean read getModified; |
734 |
|
property Name: AnsiString read GetName; |
723 |
– |
property SQLType: cardinal read GetSQLType; |
735 |
|
end; |
736 |
|
|
737 |
|
{ |
758 |
|
|
759 |
|
TPerfCounters = array[TPerfStats] of Int64; |
760 |
|
|
761 |
+ |
{Batch Query Execution Support} |
762 |
+ |
|
763 |
+ |
TBatchCompletionState = (bcExecuteFailed, bcSuccessNoInfo, bcNoMoreErrors); |
764 |
+ |
|
765 |
+ |
IBatchCompletion = interface |
766 |
+ |
['{9bc3d49d-16d9-4606-94e5-ee987103ad92}'] |
767 |
+ |
function getTotalProcessed: cardinal; |
768 |
+ |
function getState(updateNo: cardinal): TBatchCompletionState; |
769 |
+ |
function getStatusMessage(updateNo: cardinal): AnsiString; |
770 |
+ |
function getUpdated: integer; |
771 |
+ |
function getErrorStatus(var RowNo: integer; var status: IStatus): boolean; |
772 |
+ |
end; |
773 |
+ |
|
774 |
|
{The IStatement interface provides access to an SQL Statement once it has been |
775 |
|
initially prepared. The interface is returned from the IAttachment interface. |
776 |
|
} |
782 |
|
function GetPlan: AnsiString; |
783 |
|
function GetRowsAffected(var SelectCount, InsertCount, UpdateCount, DeleteCount: integer): boolean; |
784 |
|
function GetSQLStatementType: TIBSQLStatementTypes; |
785 |
+ |
function GetSQLStatementTypeName: AnsiString; |
786 |
|
function GetSQLText: AnsiString; |
787 |
|
function GetProcessedSQLText: AnsiString; |
788 |
|
function GetSQLDialect: integer; |
789 |
|
function IsPrepared: boolean; |
790 |
+ |
function HasBatchMode: boolean; |
791 |
+ |
function IsInBatchMode: boolean; |
792 |
|
procedure Prepare(aTransaction: ITransaction=nil); |
793 |
|
function Execute(aTransaction: ITransaction=nil): IResults; |
794 |
|
function OpenCursor(aTransaction: ITransaction=nil): IResultSet; |
797 |
|
procedure SetRetainInterfaces(aValue: boolean); |
798 |
|
procedure EnableStatistics(aValue: boolean); |
799 |
|
function GetPerfStatistics(var stats: TPerfCounters): boolean; |
800 |
+ |
{IBatch interface support} |
801 |
+ |
procedure AddToBatch; |
802 |
+ |
function ExecuteBatch(aTransaction: ITransaction=nil): IBatchCompletion; |
803 |
+ |
procedure CancelBatch; |
804 |
+ |
function GetBatchCompletion: IBatchCompletion; |
805 |
+ |
function GetBatchRowLimit: integer; |
806 |
+ |
procedure SetBatchRowLimit(aLimit: integer); |
807 |
+ |
{Stale Reference Check} |
808 |
+ |
procedure SetStaleReferenceChecks(Enable:boolean); {default true} |
809 |
+ |
function GetStaleReferenceChecks: boolean; |
810 |
+ |
|
811 |
|
property MetaData: IMetaData read GetMetaData; |
812 |
|
property SQLParams: ISQLParams read GetSQLParams; |
813 |
|
property SQLStatementType: TIBSQLStatementTypes read GetSQLStatementType; |
957 |
|
function getSize: integer; |
958 |
|
procedure getRawBytes(var Buffer); |
959 |
|
function getAsString: AnsiString; |
960 |
< |
function getAsInteger: integer; |
960 |
> |
function getAsInteger: int64; |
961 |
|
procedure DecodeIDCluster(var ConnectionType: integer; var DBFileName, DBSiteName: AnsiString); |
962 |
|
function getAsBytes: TByteArray; |
963 |
|
function getAsDateTime: TDateTime; |
969 |
|
function GetCount: integer; |
970 |
|
function GetItem(index: integer): IDBInfoItem; |
971 |
|
function Find(ItemType: byte): IDBInfoItem; |
972 |
< |
property AsInteger: integer read getAsInteger; |
972 |
> |
property AsInteger: int64 read getAsInteger; |
973 |
|
property AsString: AnsiString read GetAsString; |
974 |
|
property Count: integer read GetCount; |
975 |
|
property Items[index: integer]: IDBInfoItem read getItem; default; |
1102 |
|
function CreateBlob(transaction: ITransaction; SubType: integer; CharSetID: cardinal=0; BPB: IBPB=nil): IBlob; overload; |
1103 |
|
function OpenBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob; overload; |
1104 |
|
function OpenBlob(transaction: ITransaction; BlobMetaData: IBlobMetaData; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob; overload; |
1105 |
+ |
function GetInlineBlobLimit: integer; |
1106 |
+ |
procedure SetInlineBlobLimit(limit: integer); |
1107 |
|
|
1108 |
|
{Array - may use to open existing arrays. However, ISQLData.AsArray is preferred} |
1109 |
|
|
1131 |
|
procedure getFBVersion(version: TStrings); |
1132 |
|
function HasActivity: boolean; |
1133 |
|
function HasDecFloatSupport: boolean; |
1134 |
+ |
function HasBatchMode: boolean; |
1135 |
|
|
1136 |
|
{Character Sets} |
1137 |
|
function HasDefaultCharSet: boolean; |
1228 |
|
function getSize: integer; |
1229 |
|
procedure getRawBytes(var Buffer); |
1230 |
|
function getAsString: AnsiString; |
1231 |
< |
function getAsInteger: integer; |
1231 |
> |
function getAsInteger: int64; |
1232 |
|
function getAsByte: byte; |
1233 |
|
function CopyTo(stream: TStream; count: integer): integer; |
1234 |
|
property AsString: AnsiString read getAsString; |
1235 |
< |
property AsInteger: integer read getAsInteger; |
1235 |
> |
property AsInteger: int64 read getAsInteger; |
1236 |
|
property AsByte: byte read getAsByte; |
1237 |
|
end; |
1238 |
|
|
1375 |
|
{IB Client Exceptions} |
1376 |
|
EIBClientError = class(EIBError); |
1377 |
|
|
1378 |
+ |
{Used to explicitly report a Batch Buffer overflow} |
1379 |
+ |
EIBBatchBufferOverflow = class(EIBError); |
1380 |
+ |
|
1381 |
|
{The Firebird API function is used to access the IFirebirdAPI interface. |
1382 |
|
|
1383 |
|
It will load the Firebird Client Library if this is not already loaded and |