73 |
|
{$IFEND} |
74 |
|
{$ENDIF} |
75 |
|
|
76 |
+ |
{$IFNDEF LEGACYFIREBIRDAPIONLY} |
77 |
|
{$DEFINE USEFIREBIRD3API} |
78 |
+ |
{$ENDIF} |
79 |
+ |
{$IFNDEF FIREBIRD3APIONLY} |
80 |
|
{$DEFINE USELEGACYFIREBIRDAPI} |
81 |
+ |
{$ENDIF} |
82 |
|
|
83 |
|
{ |
84 |
|
This unit defines the interfaces used to provide the Pascal Language |
135 |
|
{Interface version information} |
136 |
|
FBIntf_Major = 1; |
137 |
|
FBIntf_Minor = 1; |
138 |
< |
FBIntf_Release = 3; |
139 |
< |
FBIntf_Version = '1.1.3'; |
138 |
> |
FBIntf_Release = 6; |
139 |
> |
FBIntf_Version = '1.1.6'; |
140 |
|
|
141 |
|
{These include files are converted from the 'C' originals in the Firebird API |
142 |
|
and define the various constants used by the API} |
210 |
|
SQLGetSegment, SQLPutSegment, |
211 |
|
SQLExecProcedure, SQLStartTransaction, |
212 |
|
SQLCommit, SQLRollback, |
213 |
< |
SQLSelectForUpdate, SQLSetGenerator); |
213 |
> |
SQLSelectForUpdate, SQLSetGenerator, |
214 |
> |
SQLSavePoint); |
215 |
|
|
216 |
|
TFBStatusCode = cardinal; |
217 |
|
TByteArray = array of byte; |
219 |
|
IFirebirdAPI = interface; |
220 |
|
IAttachment = interface; |
221 |
|
ITransaction = interface; |
222 |
+ |
IStatement = interface; |
223 |
|
|
224 |
|
{The IParameterBlock interface provides the template for all parameter |
225 |
|
block interfaces} |
259 |
|
This interface can be accessed from IFirebirdAPI. |
260 |
|
} |
261 |
|
|
262 |
+ |
TIBDataBaseErrorMessage = (ShowSQLCode, |
263 |
+ |
ShowIBMessage, |
264 |
+ |
ShowSQLMessage); |
265 |
+ |
|
266 |
+ |
TIBDataBaseErrorMessages = set of TIBDataBaseErrorMessage; |
267 |
+ |
|
268 |
|
IStatus = interface |
269 |
|
['{34167722-af38-4831-b08a-93162d58ede3}'] |
270 |
|
function GetIBErrorCode: Long; |
291 |
|
function GetSQLTypeName: AnsiString; |
292 |
|
function GetScale: integer; |
293 |
|
function GetSize: cardinal; |
294 |
+ |
function GetCharSetWidth: integer; |
295 |
|
function GetCharSetID: cardinal; |
296 |
|
function GetTableName: AnsiString; |
297 |
|
function GetColumnName: AnsiString; |
420 |
|
the output of an SQL Statement. |
421 |
|
} |
422 |
|
|
423 |
+ |
TIBDateTimeFormats = (dfTimestamp, {SQL TIMESTAMP} |
424 |
+ |
dfDateTime, {SQL DATETIME} |
425 |
+ |
dfTime); {SQL TIME} |
426 |
+ |
|
427 |
|
{ IColumnMetaData } |
428 |
|
|
429 |
|
IColumnMetaData = interface |
440 |
|
function getScale: integer; |
441 |
|
function getCharSetID: cardinal; |
442 |
|
function getCodePage: TSystemCodePage; |
443 |
+ |
function GetCharSetWidth: integer; |
444 |
|
function getIsNullable: boolean; |
445 |
|
function GetSize: cardinal; |
446 |
|
function GetArrayMetaData: IArrayMetaData; {Valid only for Array SQL Type} |
447 |
|
function GetBlobMetaData: IBlobMetaData; {Valid only for Blob SQL Type} |
448 |
+ |
function GetDateTimeStrLength(DateTimeFormat: TIBDateTimeFormats): integer; |
449 |
+ |
function GetStatement: IStatement; |
450 |
+ |
function GetTransaction: ITransaction; |
451 |
|
property Name: AnsiString read GetName; |
452 |
|
property Size: cardinal read GetSize; |
453 |
|
property SQLType: cardinal read GetSQLType; |
489 |
|
|
490 |
|
ISQLData = interface(IColumnMetaData) |
491 |
|
['{3f493e31-7e3f-4606-a07c-b210b9e3619d}'] |
492 |
+ |
function GetStrDataLength: short; |
493 |
|
function GetAsBoolean: boolean; |
494 |
|
function GetAsCurrency: Currency; |
495 |
|
function GetAsInt64: Int64; |
536 |
|
IResults = interface |
537 |
|
['{e836b2bb-93d1-4bbf-a8eb-7ce535de3bb5}'] |
538 |
|
function getCount: integer; |
539 |
+ |
function GetStatement: IStatement; |
540 |
|
function GetTransaction: ITransaction; |
541 |
|
function ByName(Idx: AnsiString): ISQLData; |
542 |
|
function getSQLData(index: integer): ISQLData; |
657 |
|
function getSQLParam(index: integer): ISQLParam; |
658 |
|
function ByName(Idx: AnsiString): ISQLParam ; |
659 |
|
function GetModified: Boolean; |
660 |
+ |
function GetHasCaseSensitiveParams: Boolean; |
661 |
|
property Modified: Boolean read GetModified; |
662 |
|
property Params[index: integer]: ISQLParam read getSQLParam; default; |
663 |
|
property Count: integer read getCount; |
935 |
|
function Prepare(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IStatement; overload; |
936 |
|
function Prepare(transaction: ITransaction; sql: AnsiString): IStatement; overload; |
937 |
|
function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString; |
938 |
< |
aSQLDialect: integer; GenerateParamNames: boolean=false): IStatement; overload; |
938 |
> |
aSQLDialect: integer; GenerateParamNames: boolean=false; |
939 |
> |
CaseSensitiveParams: boolean = false): IStatement; overload; |
940 |
|
function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString; |
941 |
< |
GenerateParamNames: boolean=false): IStatement; overload; |
941 |
> |
GenerateParamNames: boolean=false; |
942 |
> |
CaseSensitiveParams: boolean = false): IStatement; overload; |
943 |
|
|
944 |
|
{Events} |
945 |
|
function GetEventHandler(Events: TStrings): IEvents; overload; |
950 |
|
function CreateBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BPB: IBPB=nil): IBlob; overload; |
951 |
|
function CreateBlob(transaction: ITransaction; BlobMetaData: IBlobMetaData; BPB: IBPB=nil): IBlob; overload; |
952 |
|
function CreateBlob(transaction: ITransaction; SubType: integer; CharSetID: cardinal=0; BPB: IBPB=nil): IBlob; overload; |
953 |
< |
function OpenBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob; |
953 |
> |
function OpenBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob; overload; |
954 |
> |
function OpenBlob(transaction: ITransaction; BlobMetaData: IBlobMetaData; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob; overload; |
955 |
|
|
956 |
|
{Array - may use to open existing arrays. However, ISQLData.AsArray is preferred} |
957 |
|
|
958 |
< |
function OpenArray(transaction: ITransaction; RelationName, ColumnName: AnsiString; ArrayID: TISC_QUAD): IArray; |
958 |
> |
function OpenArray(transaction: ITransaction; RelationName, ColumnName: AnsiString; ArrayID: TISC_QUAD): IArray; overload; |
959 |
> |
function OpenArray(transaction: ITransaction; ArrayMetaData: IArrayMetaData; ArrayID: TISC_QUAD): IArray; overload; |
960 |
|
function CreateArray(transaction: ITransaction; RelationName, ColumnName: AnsiString): IArray; overload; |
961 |
|
function CreateArray(transaction: ITransaction; ArrayMetaData: IArrayMetaData): IArray; overload; |
962 |
|
function CreateArrayMetaData(SQLType: cardinal; tableName: AnsiString; columnName: AnsiString; |
976 |
|
function GetSecurityDatabase: AnsiString; |
977 |
|
function GetODSMajorVersion: integer; |
978 |
|
function GetODSMinorVersion: integer; |
979 |
+ |
procedure getFBVersion(version: TStrings); |
980 |
|
function HasActivity: boolean; |
981 |
|
|
982 |
|
{Character Sets} |
1170 |
|
function HasRollbackRetaining: boolean; |
1171 |
|
function IsEmbeddedServer: boolean; |
1172 |
|
function GetImplementationVersion: AnsiString; |
1173 |
+ |
function GetClientMajor: integer; |
1174 |
+ |
function GetClientMinor: integer; |
1175 |
|
|
1176 |
|
{Firebird 3 API} |
1177 |
|
function HasMasterIntf: boolean; |
1211 |
|
{IB Client Exceptions} |
1212 |
|
EIBClientError = class(EIBError); |
1213 |
|
|
1183 |
– |
{IBError is used internally and by IBX to throw an EIBClientError} |
1184 |
– |
|
1185 |
– |
procedure IBError(ErrMess: TIBClientError; const Args: array of const); |
1186 |
– |
|
1214 |
|
{The Firebird API function is used to access the IFirebirdAPI interface. |
1215 |
|
|
1216 |
|
It will load the Firebird Client Library if this is not already loaded and |
1338 |
|
FIBErrorCode := AIBErrorCode; |
1339 |
|
end; |
1340 |
|
|
1314 |
– |
procedure IBError(ErrMess: TIBClientError; const Args: array of const); |
1315 |
– |
begin |
1316 |
– |
raise EIBClientError.Create(Ord(ErrMess), |
1317 |
– |
Format(GetErrorMessage(ErrMess), Args)); |
1318 |
– |
end; |
1341 |
|
|
1342 |
|
initialization |
1343 |
|
FDefaultFBLibrary := nil; |