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

Comparing ibx/trunk/fbintf/IB.pas (file contents):
Revision 263 by tony, Thu Dec 6 15:55:01 2018 UTC vs.
Revision 309 by tony, Tue Jul 21 08:00:42 2020 UTC

# Line 73 | Line 73 | unit IB;
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
# Line 131 | Line 135 | const
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}
# Line 206 | Line 210 | type
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;
# Line 214 | Line 219 | type
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}
# Line 253 | Line 259 | type
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;
# Line 279 | Line 291 | type
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;
# Line 407 | Line 420 | type
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
# Line 427 | Line 444 | type
444      function GetSize: cardinal;
445      function GetArrayMetaData: IArrayMetaData; {Valid only for Array SQL Type}
446      function GetBlobMetaData: IBlobMetaData; {Valid only for Blob SQL Type}
447 +    function GetDateTimeStrLength(DateTimeFormat: TIBDateTimeFormats): integer;
448 +    function GetStatement: IStatement;
449 +    function GetTransaction: ITransaction;
450      property Name: AnsiString read GetName;
451      property Size: cardinal read GetSize;
452      property SQLType: cardinal read GetSQLType;
# Line 468 | Line 488 | type
488  
489    ISQLData = interface(IColumnMetaData)
490      ['{3f493e31-7e3f-4606-a07c-b210b9e3619d}']
491 +    function GetStrDataLength: short;
492      function GetAsBoolean: boolean;
493      function GetAsCurrency: Currency;
494      function GetAsInt64: Int64;
# Line 514 | Line 535 | type
535    IResults = interface
536      ['{e836b2bb-93d1-4bbf-a8eb-7ce535de3bb5}']
537     function getCount: integer;
538 +   function GetStatement: IStatement;
539     function GetTransaction: ITransaction;
540     function ByName(Idx: AnsiString): ISQLData;
541     function getSQLData(index: integer): ISQLData;
# Line 634 | Line 656 | type
656      function getSQLParam(index: integer): ISQLParam;
657      function ByName(Idx: AnsiString): ISQLParam ;
658      function GetModified: Boolean;
659 +    function GetHasCaseSensitiveParams: Boolean;
660      property Modified: Boolean read GetModified;
661      property Params[index: integer]: ISQLParam read getSQLParam; default;
662      property Count: integer read getCount;
# Line 911 | Line 934 | type
934      function Prepare(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IStatement; overload;
935      function Prepare(transaction: ITransaction; sql: AnsiString): IStatement; overload;
936      function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString;
937 <                       aSQLDialect: integer; GenerateParamNames: boolean=false): IStatement; overload;
937 >                       aSQLDialect: integer; GenerateParamNames: boolean=false;
938 >                       CaseSensitiveParams: boolean = false): IStatement; overload;
939      function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString;
940 <                       GenerateParamNames: boolean=false): IStatement; overload;
940 >                       GenerateParamNames: boolean=false;
941 >                       CaseSensitiveParams: boolean = false): IStatement; overload;
942  
943      {Events}
944      function GetEventHandler(Events: TStrings): IEvents; overload;
# Line 924 | Line 949 | type
949      function CreateBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BPB: IBPB=nil): IBlob; overload;
950      function CreateBlob(transaction: ITransaction; BlobMetaData: IBlobMetaData; BPB: IBPB=nil): IBlob; overload;
951      function CreateBlob(transaction: ITransaction; SubType: integer; CharSetID: cardinal=0; BPB: IBPB=nil): IBlob; overload;
952 <    function OpenBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob;
952 >    function OpenBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob; overload;
953 >    function OpenBlob(transaction: ITransaction; BlobMetaData: IBlobMetaData; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob;  overload;
954  
955      {Array - may use to open existing arrays. However, ISQLData.AsArray is preferred}
956  
957 <    function OpenArray(transaction: ITransaction; RelationName, ColumnName: AnsiString; ArrayID: TISC_QUAD): IArray;
957 >    function OpenArray(transaction: ITransaction; RelationName, ColumnName: AnsiString; ArrayID: TISC_QUAD): IArray; overload;
958 >    function OpenArray(transaction: ITransaction; ArrayMetaData: IArrayMetaData; ArrayID: TISC_QUAD): IArray; overload;
959      function CreateArray(transaction: ITransaction; RelationName, ColumnName: AnsiString): IArray; overload;
960      function CreateArray(transaction: ITransaction; ArrayMetaData: IArrayMetaData): IArray; overload;
961      function CreateArrayMetaData(SQLType: cardinal; tableName: AnsiString; columnName: AnsiString;
# Line 948 | Line 975 | type
975      function GetSecurityDatabase: AnsiString;
976      function GetODSMajorVersion: integer;
977      function GetODSMinorVersion: integer;
978 +    procedure getFBVersion(version: TStrings);
979      function HasActivity: boolean;
980  
981      {Character Sets}
# Line 1141 | Line 1169 | type
1169      function HasRollbackRetaining: boolean;
1170      function IsEmbeddedServer: boolean;
1171      function GetImplementationVersion: AnsiString;
1172 +    function GetClientMajor: integer;
1173 +    function GetClientMinor: integer;
1174  
1175      {Firebird 3 API}
1176      function HasMasterIntf: boolean;
# Line 1180 | Line 1210 | type
1210     {IB Client Exceptions}
1211     EIBClientError = class(EIBError);
1212  
1183 {IBError is used internally and by IBX to throw an EIBClientError}
1184
1185 procedure IBError(ErrMess: TIBClientError; const Args: array of const);
1186
1213   {The Firebird API function is used to access the IFirebirdAPI interface.
1214  
1215   It will load the Firebird Client Library if this is not already loaded and
# Line 1311 | Line 1337 | begin
1337    FIBErrorCode := AIBErrorCode;
1338   end;
1339  
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;
1340  
1341   initialization
1342    FDefaultFBLibrary := nil;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines