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 315 by tony, Thu Feb 25 11:56:36 2021 UTC vs.
ibx/branches/udr/client/IB.pas (file contents), Revision 386 by tony, Tue Jan 18 12:05:35 2022 UTC

# Line 134 | Line 134 | uses
134   const
135    {Interface version information}
136    FBIntf_Major = 1;
137 <  FBIntf_Minor = 2;
137 >  FBIntf_Minor = 4;
138    FBIntf_Release = 0;
139 <  FBIntf_Version = '1.2.0';
139 >  FBIntf_Version = '1.4.0';
140  
141   const
142    {DPB, TPB and SPB Parameter Block Name Prefixes}
# Line 248 | Line 248 | type
248    ITransaction = interface;
249    IStatement = interface;
250  
251 +  {The IFBNumeric interface provides a managed type for Fixed Point integers
252 +   used to hold Firebird Numeric(m,n) types}
253 +
254 +  IFBNumeric = interface
255 +    ['{8bdccfe9-d552-446b-bd82-844ca264455d}']
256 +    function getRawValue: Int64;
257 +    function getScale: integer;
258 +    function AdjustScaleTo(aNewScale: integer): IFBNumeric;
259 +    function getAsString: AnsiString;
260 +    function getAsDouble: double;
261 +    function getAsBCD: TBCD;
262 +    function getAsInt64: Int64; {scaled}
263 +    function getAsInteger: integer; {scaled - may be truncated}
264 +    function getAsSmallInt: SmallInt; {scaled - may be truncated}
265 +    function getAsCurrency: Currency;
266 +  end;
267 +
268    {The IParameterBlock interface provides the template for all parameter
269     block interfaces}
270  
# Line 263 | Line 280 | type
280  
281    IParameterBlockWithTypeNames<_IItem> = interface(IParameterBlock<_IItem>)
282      function AddByTypeName(ParamTypeName: AnsiString): _IItem;
283 <    function GetDPBParamTypeName(ParamType: byte): Ansistring;
283 >    function GetDPBParamTypeName(ParamType: byte): Ansistring; deprecated 'Use Get ParamTypeName';
284 >    function GetParamTypeName(ParamType: byte): Ansistring;
285    end;
286  
287    {IParameterBlockItem is not used on its own but instead provides a base type for
# Line 300 | Line 318 | type
318  
319     TIBDataBaseErrorMessages   = set of TIBDataBaseErrorMessage;
320  
321 +   TStatusCode = long;
322 +
323    IStatus = interface
324      ['{34167722-af38-4831-b08a-93162d58ede3}']
325 <    function GetIBErrorCode: Long;
326 <    function Getsqlcode: Long;
325 >    function GetIBErrorCode: TStatusCode;
326 >    function Getsqlcode: TStatusCode;
327      function GetMessage: AnsiString;
328      function CheckStatusVector(ErrorCodes: array of TFBStatusCode): Boolean;
329      function GetIBDataBaseErrorMessages: TIBDataBaseErrorMessages;
330 +    function Clone: IStatus;
331      procedure SetIBDataBaseErrorMessages(Value: TIBDataBaseErrorMessages);
332    end;
333  
# Line 497 | Line 518 | type
518      function GetDateTimeStrLength(DateTimeFormat: TIBDateTimeFormats): integer;
519      function GetStatement: IStatement;
520      function GetTransaction: ITransaction;
521 +    function GetAttachment: IAttachment;
522      property Name: AnsiString read GetName;
523      property Size: cardinal read GetSize;
524      property SQLType: cardinal read GetSQLType;
# Line 563 | Line 585 | type
585      function GetAsBlob(BPB: IBPB): IBlob; overload;
586      function GetAsArray: IArray;
587      function GetAsBCD: tBCD;
588 +    function GetAsNumeric: IFBNumeric;
589      property AsDate: TDateTime read GetAsDateTime;
590      property AsBoolean:boolean read GetAsBoolean;
591      property AsTime: TDateTime read GetAsDateTime;
# Line 581 | Line 604 | type
604      property AsBlob: IBlob read GetAsBlob;
605      property AsArray: IArray read GetAsArray;
606      property AsBCD: tBCD read GetAsBCD;
607 +    property AsNumeric: IFBNumeric read GetAsNumeric;
608      property IsNull: Boolean read GetIsNull;
609      property Value: Variant read GetAsVariant;
610    end;
# Line 596 | Line 620 | type
620     function getCount: integer;
621     function GetStatement: IStatement;
622     function GetTransaction: ITransaction;
623 +   function GetAttachment: IAttachment;
624     function ByName(Idx: AnsiString): ISQLData;
625     function getSQLData(index: integer): ISQLData;
626     procedure GetData(index: integer; var IsNull:boolean; var len: short; var data: PByte);
# Line 611 | Line 636 | type
636    }
637    IResultSet = interface(IResults)
638      ['{0ae4979b-7857-4e8c-8918-ec6f155b51a0}']
639 <    function FetchNext: boolean;
639 >    function FetchNext: boolean; {fetch next record}
640 >    function FetchPrior: boolean; {fetch previous record}
641 >    function FetchFirst:boolean; {fetch first record}
642 >    function FetchLast: boolean; {fetch last record}
643 >    function FetchAbsolute(position: Integer): boolean; {fetch record by its absolute position in result set}
644 >    function FetchRelative(offset: Integer): boolean; {fetch record by position relative to current}
645      function GetCursorName: AnsiString;
646 +    function IsBof: boolean;
647      function IsEof: boolean;
648      procedure Close;
649    end;
650  
651    {The ISQLParam interface is used to provide access to each parameter in a
652 <   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
652 >   parametised SQL Statement. The interface comprises the Setter Methods and properties used to
653     set the value of each parameter.
654  
655     Automatic conversion is provided to and from strings. That is GetAsString and
656     SetAsString are safe to use for sql types other than boolean - provided automatic
657     conversion is possible.
658 +
659 +   ISQLParam is subclassed from the IParamMetaData interface. This interface provides
660 +   access to the parameter metadata. This metadata is mutable and can change after
661 +   a parameter is set to a given value. This is acceptable as long as the parameter
662 +   metadata is type compatible with the underlying column metadata and hence the
663 +   parameter value can be converted by Firebird into a value acceptable by the
664 +   underlying column. The column metadata, which is unmutable, can be obtained
665 +   by the ISQLParam.getColMetadata interface. When a statement is prepared, the
666 +   parameter metadata is always initialised to the column metadata.
667    }
668  
669 <  ISQLParam = interface
670 <    ['{b22b4578-6d41-4807-a9a9-d2ec8d1d5a14}']
637 <    function GetIndex: integer;
669 >  IParamMetaData = interface
670 >  ['{4e148c4e-2d48-4991-a263-f66eca05c6aa}']
671      function GetSQLType: cardinal;
672      function GetSQLTypeName: AnsiString;
673      function getSubtype: integer;
641    function getName: AnsiString;
674      function getScale: integer;
675      function getCharSetID: cardinal;
676      function getCodePage: TSystemCodePage;
677      function getIsNullable: boolean;
678      function GetSize: cardinal;
679 +    property SQLType: cardinal read GetSQLType;
680 +  end;
681 +
682 +  ISQLParam = interface(IParamMetaData)
683 +    ['{b22b4578-6d41-4807-a9a9-d2ec8d1d5a14}']
684 +    function getColMetadata: IParamMetaData;
685 +    function GetStatement: IStatement;
686 +    function GetTransaction: ITransaction;
687 +    function GetAttachment: IAttachment;
688 +    function GetIndex: integer;
689 +    function getName: AnsiString;
690      function GetAsBoolean: boolean;
691      function GetAsCurrency: Currency;
692      function GetAsInt64: Int64;
# Line 667 | Line 710 | type
710      function GetAsBlob: IBlob;
711      function GetAsArray: IArray;
712      function GetAsBCD: tBCD;
713 <    function GetStatement: IStatement;
671 <    function GetTransaction: ITransaction;
713 >    function GetAsNumeric: IFBNumeric;
714      procedure Clear;
715      function GetModified: boolean;
716      procedure SetAsBoolean(AValue: boolean);
# Line 697 | Line 739 | type
739      procedure SetAsQuad(aValue: TISC_QUAD);
740      procedure SetCharSetID(aValue: cardinal);
741      procedure SetAsBcd(aValue: tBCD);
742 +    procedure SetAsNumeric(Value: IFBNumeric);
743      property AsDate: TDateTime read GetAsDateTime write SetAsDate;
744      property AsBoolean:boolean read GetAsBoolean write SetAsBoolean;
745      property AsTime: TDateTime read GetAsDateTime write SetAsTime;
# Line 714 | Line 757 | type
757      property AsBlob: IBlob read GetAsBlob write SetAsBlob;
758      property AsArray: IArray read GetAsArray write SetAsArray;
759      property AsBCD: tBCD read GetAsBCD write SetAsBCD;
760 +    property AsNumeric: IFBNumeric read GetAsNumeric write SetAsNumeric;
761      property AsQuad: TISC_QUAD read GetAsQuad write SetAsQuad;
762      property Value: Variant read GetAsVariant write SetAsVariant;
763      property IsNull: Boolean read GetIsNull write SetIsNull;
764      property IsNullable: Boolean read GetIsNullable;
765      property Modified: Boolean read getModified;
766      property Name: AnsiString read GetName;
723    property SQLType: cardinal read GetSQLType;
767    end;
768  
769     {
# Line 735 | Line 778 | type
778      function ByName(Idx: AnsiString): ISQLParam ;
779      function GetModified: Boolean;
780      function GetHasCaseSensitiveParams: Boolean;
781 +    function GetStatement: IStatement;
782 +    function GetTransaction: ITransaction;
783 +    function GetAttachment: IAttachment;
784 +    procedure Clear;
785      property Modified: Boolean read GetModified;
786      property Params[index: integer]: ISQLParam read getSQLParam; default;
787      property Count: integer read getCount;
# Line 747 | Line 794 | type
794  
795    TPerfCounters = array[TPerfStats] of Int64;
796  
797 +  {Batch Query Execution Support}
798 +
799 +  TBatchCompletionState = (bcExecuteFailed, bcSuccessNoInfo, bcNoMoreErrors);
800 +
801 +  IBatchCompletion = interface
802 +  ['{9bc3d49d-16d9-4606-94e5-ee987103ad92}']
803 +    function getTotalProcessed: cardinal;
804 +    function getState(updateNo: cardinal): TBatchCompletionState;
805 +    function getStatusMessage(updateNo: cardinal): AnsiString;
806 +    function getUpdated: integer;
807 +    function getErrorStatus(var RowNo: integer; var status: IStatus): boolean;
808 +    end;
809 +
810    {The IStatement interface provides access to an SQL Statement once it has been
811     initially prepared. The interface is returned from the IAttachment interface.
812     }
813  
814 +  TStatementFlag = (stHasCursor,stRepeatExecute,stScrollable);
815 +  TStatementFlags = set of TStatementFlag;
816 +
817    IStatement = interface
818      ['{a260576d-a07d-4a66-b02d-1b72543fd7cf}']
819      function GetMetaData: IMetaData;  {Output Metadata}
# Line 758 | Line 821 | type
821      function GetPlan: AnsiString;
822      function GetRowsAffected(var SelectCount, InsertCount, UpdateCount, DeleteCount: integer): boolean;
823      function GetSQLStatementType: TIBSQLStatementTypes;
824 +    function GetSQLStatementTypeName: AnsiString;
825      function GetSQLText: AnsiString;
826      function GetProcessedSQLText: AnsiString;
827      function GetSQLDialect: integer;
828 +    function GetFlags: TStatementFlags;
829      function IsPrepared: boolean;
830 <    procedure Prepare(aTransaction: ITransaction=nil);
830 >    function HasBatchMode: boolean;
831 >    function IsInBatchMode: boolean;
832 >    procedure Prepare(aTransaction: ITransaction=nil); overload;
833 >    procedure Prepare(CursorName: AnsiString; aTransaction: ITransaction=nil); overload;
834      function Execute(aTransaction: ITransaction=nil): IResults;
835 <    function OpenCursor(aTransaction: ITransaction=nil): IResultSet;
835 >    function OpenCursor(aTransaction: ITransaction=nil): IResultSet; overload;
836 >    function OpenCursor(Scrollable: boolean; aTransaction: ITransaction=nil): IResultSet; overload;
837      function GetAttachment: IAttachment;
838      function GetTransaction: ITransaction;
839      procedure SetRetainInterfaces(aValue: boolean);
840      procedure EnableStatistics(aValue: boolean);
841      function GetPerfStatistics(var stats: TPerfCounters): boolean;
842 +    {IBatch interface support}
843 +    procedure AddToBatch;
844 +    function ExecuteBatch(aTransaction: ITransaction=nil): IBatchCompletion;
845 +    procedure CancelBatch;
846 +    function GetBatchCompletion: IBatchCompletion;
847 +    function GetBatchRowLimit: integer;
848 +    procedure SetBatchRowLimit(aLimit: integer);
849 +    {Stale Reference Check}
850 +    procedure SetStaleReferenceChecks(Enable:boolean); {default true}
851 +    function GetStaleReferenceChecks: boolean;
852 +
853      property MetaData: IMetaData read GetMetaData;
854      property SQLParams: ISQLParams read GetSQLParams;
855      property SQLStatementType: TIBSQLStatementTypes read GetSQLStatementType;
856    end;
857  
858 +  ITrInfoItem = interface
859 +    ['{41455e1a-f84e-4e26-aff0-1a78e8b69cfe}']
860 +    function getItemType: byte;
861 +    function getSize: integer;
862 +    function getAsString: AnsiString;
863 +    function getAsInteger: int64;
864 +    procedure DecodeTraIsolation(var IsolationType, RecVersion: byte);
865 +  end;
866 +
867 +  { ITrInformation }
868 +
869 +  ITrInformation = interface
870 +    ['{e6ea4a52-c1a1-44ba-9609-c8bcc7cba7b2}']
871 +    function GetCount: integer;
872 +    function GetItem(index: integer): ITrInfoItem;
873 +    function Find(ItemType: byte): ITrInfoItem;
874 +    procedure PrintBuf; {can be used to print buffer in hex for debugging}
875 +    property Count: integer read GetCount;
876 +    property Items[index: integer]: ITrInfoItem read getItem; default;
877 +  end;
878 +
879    {Transaction Parameter Block: (TPB)
880  
881     The TPB provides the parameters used when starting a transaction. It is allocated
# Line 788 | Line 889 | type
889  
890    ITPBItem = interface(IParameterBlockItemWithTypeName)
891      ['{544c1f2b-7c12-4a87-a4a5-face7ea72671}']
791    function getParamTypeName: AnsiString;
892    end;
893  
894    ITPB = interface(IParameterBlockWithTypeNames<ITPBItem>)
895      ['{7369b0ff-defe-437b-81fe-19b211d42d25}']
896 +    function AsText: AnsiString;
897    end;
898  
899    {The ITransactionAction interface provides access to a Transaction once it
# Line 811 | Line 912 | type
912      function getTPB: ITPB;
913      procedure Start(DefaultCompletion: TTransactionCompletion=taCommit);
914      function GetInTransaction: boolean;
915 +    function GetIsReadOnly: boolean;
916 +    function GetTransactionID: integer;
917 +    function GetJournalingActive(attachment: IAttachment): boolean;
918 +    function GetDefaultCompletion: TTransactionCompletion;
919      procedure PrepareForCommit; {Two phase commit - stage 1}
920      procedure Commit(Force: boolean=false);
921      procedure CommitRetaining;
# Line 819 | Line 924 | type
924      procedure RollbackRetaining;
925      function GetAttachmentCount: integer;
926      function GetAttachment(index: integer): IAttachment;
927 +    function GetTrInformation(Requests: array of byte): ITrInformation; overload;
928 +    function GetTrInformation(Request: byte): ITrInformation; overload;
929 +    function GetTransactionName: AnsiString;
930 +    procedure SetTransactionName(aValue: AnsiString);
931      property InTransaction: boolean read GetInTransaction;
932 +    property TransactionName: AnsiString read GetTransactionName write SetTransactionName;
933    end;
934  
935    { The IEvents Interface is used to handle events from a single database. The
# Line 849 | Line 959 | type
959      ['{6a0be233-ed08-4524-889c-2e45d0c20e5f}']
960      procedure GetEvents(EventNames: TStrings);
961      procedure SetEvents(EventNames: TStrings); overload;
962 <    procedure SetEvents(EventName: AnsiString); overload;
962 >    procedure SetEvents(EventName: string); overload;
963      procedure Cancel;
964      function ExtractEventCounts: TEventCounts;
965      procedure WaitForEvent;
# Line 919 | Line 1029 | type
1029      function getSize: integer;
1030      procedure getRawBytes(var Buffer);
1031      function getAsString: AnsiString;
1032 <    function getAsInteger: integer;
1032 >    function getAsInteger: int64;
1033      procedure DecodeIDCluster(var ConnectionType: integer; var DBFileName, DBSiteName: AnsiString);
1034      function getAsBytes: TByteArray;
1035      function getAsDateTime: TDateTime;
# Line 931 | Line 1041 | type
1041      function GetCount: integer;
1042      function GetItem(index: integer): IDBInfoItem;
1043      function Find(ItemType: byte): IDBInfoItem;
1044 <    property AsInteger: integer read getAsInteger;
1044 >    property AsInteger: int64 read getAsInteger;
1045      property AsString: AnsiString read GetAsString;
1046      property Count: integer read GetCount;
1047      property Items[index: integer]: IDBInfoItem read getItem; default;
# Line 982 | Line 1092 | type
1092       ['{e676067b-1cf4-4eba-9256-9724f57e0d16}']
1093     end;
1094  
1095 +   {Journaling options. Default is [joReadWriteTransactions,joModifyQueries] }
1096 +
1097 +   TJournalOption = (joReadOnlyTransactions, joReadWriteTransactions,
1098 +                     joModifyQueries, joReadOnlyQueries,joNoServerTable);
1099 +
1100 +   TJournalOptions = set of TJournalOption;
1101 +
1102    {The IAttachment interface provides access to a Database Connection. It may be
1103     used to:
1104  
# Line 1019 | Line 1136 | type
1136      procedure Disconnect(Force: boolean=false);
1137      function IsConnected: boolean;
1138      procedure DropDatabase;
1139 <    function StartTransaction(TPB: array of byte; DefaultCompletion: TTransactionCompletion=taCommit): ITransaction; overload;
1140 <    function StartTransaction(TPB: ITPB; DefaultCompletion: TTransactionCompletion=taCommit): ITransaction; overload;
1139 >    function StartTransaction(TPB: array of byte;
1140 >                              DefaultCompletion: TTransactionCompletion=taCommit;
1141 >                              aName: AnsiString=''): ITransaction; overload;
1142 >    function StartTransaction(TPB: ITPB;
1143 >                              DefaultCompletion: TTransactionCompletion=taCommit;
1144 >                              aName: AnsiString=''): ITransaction; overload;
1145      procedure ExecImmediate(transaction: ITransaction; sql: AnsiString; SQLDialect: integer); overload;
1146      procedure ExecImmediate(TPB: array of byte; sql: AnsiString; SQLDialect: integer); overload;
1147      procedure ExecImmediate(transaction: ITransaction; sql: AnsiString); overload;
# Line 1029 | Line 1150 | type
1150      function ExecuteSQL(transaction: ITransaction; sql: AnsiString; SQLDialect: integer; params: array of const): IResults; overload;
1151      function ExecuteSQL(TPB: array of byte; sql: AnsiString; params: array of const): IResults; overload;
1152      function ExecuteSQL(transaction: ITransaction; sql: AnsiString; params: array of const): IResults; overload;
1032    function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IResultSet; overload;
1153      function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer;
1154 +                             Scrollable: boolean=false): IResultSet; overload;
1155 +    function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer;
1156 +                             params: array of const): IResultSet; overload;
1157 +    function OpenCursor(transaction: ITransaction; sql: AnsiString; Scrollable: boolean=false): IResultSet; overload;
1158 +    function OpenCursor(transaction: ITransaction; sql: AnsiString; Scrollable: boolean;
1159                               params: array of const): IResultSet; overload;
1035    function OpenCursor(transaction: ITransaction; sql: AnsiString): IResultSet; overload;
1160      function OpenCursor(transaction: ITransaction; sql: AnsiString;
1161                               params: array of const): IResultSet; overload;
1162 <    function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IResultSet; overload;
1162 >    function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; Scrollable: boolean;
1163 >                             params: array of const): IResultSet; overload;
1164 >    function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer;
1165 >                             Scrollable: boolean=false): IResultSet; overload;
1166      function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer;
1167                               params: array of const): IResultSet; overload;
1168 <    function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString): IResultSet; overload;
1168 >    function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; Scrollable: boolean;
1169 >                             params: array of const): IResultSet; overload;
1170 >    function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; Scrollable: boolean=false): IResultSet; overload;
1171      function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString;
1172                               params: array of const): IResultSet; overload;
1173 <    function OpenCursorAtStart(sql: AnsiString): IResultSet; overload;
1173 >    function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; Scrollable: boolean;
1174 >                             params: array of const): IResultSet; overload;
1175 >    function OpenCursorAtStart(sql: AnsiString; Scrollable: boolean=false): IResultSet; overload;
1176 >    function OpenCursorAtStart(sql: AnsiString; Scrollable: boolean;
1177 >                             params: array of const): IResultSet; overload;
1178      function OpenCursorAtStart(sql: AnsiString;
1179                               params: array of const): IResultSet; overload;
1180 <    function Prepare(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IStatement; overload;
1181 <    function Prepare(transaction: ITransaction; sql: AnsiString): IStatement; overload;
1180 >    function Prepare(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; CursorName: AnsiString=''): IStatement; overload;
1181 >    function Prepare(transaction: ITransaction; sql: AnsiString; CursorName: AnsiString=''): IStatement; overload;
1182      function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString;
1183                         aSQLDialect: integer; GenerateParamNames: boolean=false;
1184 <                       CaseSensitiveParams: boolean = false): IStatement; overload;
1184 >                       CaseSensitiveParams: boolean = false; CursorName: AnsiString=''): IStatement; overload;
1185      function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString;
1186                         GenerateParamNames: boolean=false;
1187 <                       CaseSensitiveParams: boolean = false): IStatement; overload;
1187 >                       CaseSensitiveParams: boolean = false; CursorName: AnsiString=''): IStatement; overload;
1188  
1189      {Events}
1190      function GetEventHandler(Events: TStrings): IEvents; overload;
# Line 1064 | Line 1197 | type
1197      function CreateBlob(transaction: ITransaction; SubType: integer; CharSetID: cardinal=0; BPB: IBPB=nil): IBlob; overload;
1198      function OpenBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob; overload;
1199      function OpenBlob(transaction: ITransaction; BlobMetaData: IBlobMetaData; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob;  overload;
1200 +    function GetInlineBlobLimit: integer;
1201 +    procedure SetInlineBlobLimit(limit: integer);
1202  
1203      {Array - may use to open existing arrays. However, ISQLData.AsArray is preferred}
1204  
# Line 1077 | Line 1212 | type
1212  
1213      {Database Information}
1214      function GetSQLDialect: integer;
1215 +    function GetAttachmentID: integer;
1216      function GetBlobMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IBlobMetaData;
1217      function GetArrayMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IArrayMetaData;
1218      function GetDBInformation(Requests: array of byte): IDBInformation; overload;
# Line 1091 | Line 1227 | type
1227      procedure getFBVersion(version: TStrings);
1228      function HasActivity: boolean;
1229      function HasDecFloatSupport: boolean;
1230 +    function HasBatchMode: boolean;
1231 +    function HasScollableCursors: boolean;
1232 +    function HasTable(aTableName: AnsiString): boolean;  {case sensitive}
1233 +    function HasFunction(aFunctionName: AnsiString): boolean; {case sensitive}
1234 +    function HasProcedure(aProcName: AnsiString): boolean; {case sensitive}
1235  
1236      {Character Sets}
1237 +    function GetCharSetID: integer; {connection character set}
1238      function HasDefaultCharSet: boolean;
1239      function GetDefaultCharSetID: integer;
1240      function GetCharsetName(CharSetID: integer): AnsiString;
# Line 1106 | Line 1248 | type
1248      {Time Zone Database}
1249      function GetTimeZoneServices: ITimeZoneServices;
1250      function HasTimeZoneSupport: boolean;
1251 +
1252 +    {Client side Journaling}
1253 +    function JournalingActive: boolean;
1254 +    function GetJournalOptions: TJournalOptions;
1255 +    function StartJournaling(aJournalLogFile: AnsiString): integer; overload;
1256 +    function StartJournaling(aJournalLogFile: AnsiString; Options: TJournalOptions): integer; overload;
1257 +    function StartJournaling(S: TStream; Options: TJournalOptions): integer; overload;
1258 +    procedure StopJournaling(RetainJournal: boolean);
1259   end;
1260  
1261    TProtocolAll = (TCP, SPX, NamedPipe, Local, inet, inet4, inet6, wnet, xnet, unknownProtocol);
# Line 1187 | Line 1337 | type
1337      function getSize: integer;
1338      procedure getRawBytes(var Buffer);
1339      function getAsString: AnsiString;
1340 <    function getAsInteger: integer;
1340 >    function getAsInteger: int64;
1341      function getAsByte: byte;
1342      function CopyTo(stream: TStream; count: integer): integer;
1343      property AsString: AnsiString read getAsString;
1344 <    property AsInteger: integer read getAsInteger;
1344 >    property AsInteger: int64 read getAsInteger;
1345      property AsByte: byte read getAsByte;
1346    end;
1347  
# Line 1274 | Line 1424 | type
1424      {Start Transaction against multiple databases}
1425      function AllocateTPB: ITPB;
1426      function StartTransaction(Attachments: array of IAttachment;
1427 <             TPB: array of byte; DefaultCompletion: TTransactionCompletion=taCommit): ITransaction; overload;
1427 >             TPB: array of byte; DefaultCompletion: TTransactionCompletion=taCommit;
1428 >             aName: AnsiString=''): ITransaction; overload;
1429      function StartTransaction(Attachments: array of IAttachment;
1430 <             TPB: ITPB; DefaultCompletion: TTransactionCompletion=taCommit): ITransaction; overload;
1430 >             TPB: ITPB; DefaultCompletion: TTransactionCompletion=taCommit;
1431 >             aName: AnsiString=''): ITransaction; overload;
1432  
1433      {Service Manager}
1434      function HasServiceAPI: boolean;
# Line 1325 | Line 1477 | type
1477     EIBInterBaseError = class(EIBError)
1478     private
1479       FIBErrorCode: Long;
1480 +     FStatus: IStatus;
1481     public
1482 <     constructor Create(Status: IStatus); overload;
1482 >     constructor Create(aStatus: IStatus); overload;
1483       constructor Create(ASQLCode: Long; AIBErrorCode: Long; Msg: AnsiString); overload;
1484       property IBErrorCode: Long read FIBErrorCode;
1485 +     property Status: IStatus read FStatus;
1486     end;
1487  
1488     {IB Client Exceptions}
1489     EIBClientError = class(EIBError);
1490  
1491 +   {Used to explicitly report a Batch Buffer overflow}
1492 +   EIBBatchBufferOverflow = class(EIBError);
1493 +
1494   {The Firebird API function is used to access the IFirebirdAPI interface.
1495  
1496   It will load the Firebird Client Library if this is not already loaded and
# Line 1354 | Line 1511 | procedure CheckIBLoaded;
1511  
1512   function LoadFBLibrary(aLibPathName: string): IFirebirdLibrary;
1513  
1514 + {$if not declared(Null)} {Needed for Delphi}
1515 + function Null: Variant;       // Null standard constant
1516 + {$define NEEDNULLFUNCTION}
1517 + {$ifend}
1518  
1519   implementation
1520  
1521 < uses FBClientAPI
1521 > uses FBClientAPI {$if not declared(NULL)}, Variants {$ifend}
1522    {$IFDEF USELEGACYFIREBIRDAPI}, FB25ClientAPI {$ENDIF}
1523    {$IFDEF USEFIREBIRD3API}, FB30ClientAPI {$ENDIF};
1524  
# Line 1449 | Line 1610 | end;
1610  
1611   { EIBInterBaseError }
1612  
1613 < constructor EIBInterBaseError.Create(Status: IStatus);
1613 > constructor EIBInterBaseError.Create(aStatus: IStatus);
1614   begin
1615 <  inherited Create(Status.Getsqlcode,Status.GetMessage);
1616 <  FIBErrorCode := Status.GetIBErrorCode;
1615 >  inherited Create(aStatus.Getsqlcode,aStatus.GetMessage);
1616 >  FIBErrorCode := aStatus.GetIBErrorCode;
1617 >  FStatus := aStatus.Clone;
1618   end;
1619  
1620   constructor EIBInterBaseError.Create(ASQLCode: Long; AIBErrorCode: Long;
# Line 1462 | Line 1624 | begin
1624    FIBErrorCode := AIBErrorCode;
1625   end;
1626  
1627 + {$ifdef NEEDNULLFUNCTION}
1628 + function Null: Variant;       // Null standard constant
1629 +   begin
1630 +     VarClearProc(TVarData(Result));
1631 +     TVarData(Result).VType := varnull;
1632 +   end;
1633 + {$endif}
1634  
1635   initialization
1636    FDefaultFBLibrary := nil;

Comparing:
ibx/trunk/fbintf/IB.pas (property svn:eol-style), Revision 315 by tony, Thu Feb 25 11:56:36 2021 UTC vs.
ibx/branches/udr/client/IB.pas (property svn:eol-style), Revision 386 by tony, Tue Jan 18 12:05:35 2022 UTC

# Line 0 | Line 1
1 + native

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines