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/branches/journaling/fbintf/IB.pas (file contents), Revision 363 by tony, Tue Dec 7 13:30:05 2021 UTC vs.
ibx/branches/udr/client/IB.pas (file contents), Revision 390 by tony, Sat Jan 22 16:15:12 2022 UTC

# Line 134 | Line 134 | uses
134   const
135    {Interface version information}
136    FBIntf_Major = 1;
137 <  FBIntf_Minor = 3;
138 <  FBIntf_Release = 2;
139 <  FBIntf_Version = '1.3.2';
137 >  FBIntf_Minor = 4;
138 >  FBIntf_Release = 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 305 | Line 322 | type
322  
323    IStatus = interface
324      ['{34167722-af38-4831-b08a-93162d58ede3}']
325 +    function InErrorState: boolean;
326      function GetIBErrorCode: TStatusCode;
327      function Getsqlcode: TStatusCode;
328      function GetMessage: AnsiString;
329      function CheckStatusVector(ErrorCodes: array of TFBStatusCode): Boolean;
330      function GetIBDataBaseErrorMessages: TIBDataBaseErrorMessages;
331 +    function Clone: IStatus;
332      procedure SetIBDataBaseErrorMessages(Value: TIBDataBaseErrorMessages);
333    end;
334  
# Line 500 | Line 519 | type
519      function GetDateTimeStrLength(DateTimeFormat: TIBDateTimeFormats): integer;
520      function GetStatement: IStatement;
521      function GetTransaction: ITransaction;
522 +    function GetAttachment: IAttachment;
523      property Name: AnsiString read GetName;
524      property Size: cardinal read GetSize;
525      property SQLType: cardinal read GetSQLType;
# Line 566 | Line 586 | type
586      function GetAsBlob(BPB: IBPB): IBlob; overload;
587      function GetAsArray: IArray;
588      function GetAsBCD: tBCD;
589 +    function GetAsNumeric: IFBNumeric;
590      property AsDate: TDateTime read GetAsDateTime;
591      property AsBoolean:boolean read GetAsBoolean;
592      property AsTime: TDateTime read GetAsDateTime;
# Line 584 | Line 605 | type
605      property AsBlob: IBlob read GetAsBlob;
606      property AsArray: IArray read GetAsArray;
607      property AsBCD: tBCD read GetAsBCD;
608 +    property AsNumeric: IFBNumeric read GetAsNumeric;
609      property IsNull: Boolean read GetIsNull;
610      property Value: Variant read GetAsVariant;
611    end;
# Line 599 | Line 621 | type
621     function getCount: integer;
622     function GetStatement: IStatement;
623     function GetTransaction: ITransaction;
624 +   function GetAttachment: IAttachment;
625     function ByName(Idx: AnsiString): ISQLData;
626     function getSQLData(index: integer): ISQLData;
627     procedure GetData(index: integer; var IsNull:boolean; var len: short; var data: PByte);
# Line 660 | Line 683 | type
683    ISQLParam = interface(IParamMetaData)
684      ['{b22b4578-6d41-4807-a9a9-d2ec8d1d5a14}']
685      function getColMetadata: IParamMetaData;
686 +    function GetStatement: IStatement;
687 +    function GetTransaction: ITransaction;
688 +    function GetAttachment: IAttachment;
689      function GetIndex: integer;
690      function getName: AnsiString;
691      function GetAsBoolean: boolean;
# Line 685 | Line 711 | type
711      function GetAsBlob: IBlob;
712      function GetAsArray: IArray;
713      function GetAsBCD: tBCD;
714 <    function GetStatement: IStatement;
689 <    function GetTransaction: ITransaction;
714 >    function GetAsNumeric: IFBNumeric;
715      procedure Clear;
716      function GetModified: boolean;
717      procedure SetAsBoolean(AValue: boolean);
# Line 715 | Line 740 | type
740      procedure SetAsQuad(aValue: TISC_QUAD);
741      procedure SetCharSetID(aValue: cardinal);
742      procedure SetAsBcd(aValue: tBCD);
743 +    procedure SetAsNumeric(Value: IFBNumeric);
744      property AsDate: TDateTime read GetAsDateTime write SetAsDate;
745      property AsBoolean:boolean read GetAsBoolean write SetAsBoolean;
746      property AsTime: TDateTime read GetAsDateTime write SetAsTime;
# Line 732 | Line 758 | type
758      property AsBlob: IBlob read GetAsBlob write SetAsBlob;
759      property AsArray: IArray read GetAsArray write SetAsArray;
760      property AsBCD: tBCD read GetAsBCD write SetAsBCD;
761 +    property AsNumeric: IFBNumeric read GetAsNumeric write SetAsNumeric;
762      property AsQuad: TISC_QUAD read GetAsQuad write SetAsQuad;
763      property Value: Variant read GetAsVariant write SetAsVariant;
764      property IsNull: Boolean read GetIsNull write SetIsNull;
# Line 752 | Line 779 | type
779      function ByName(Idx: AnsiString): ISQLParam ;
780      function GetModified: Boolean;
781      function GetHasCaseSensitiveParams: Boolean;
782 +    function GetStatement: IStatement;
783 +    function GetTransaction: ITransaction;
784 +    function GetAttachment: IAttachment;
785 +    procedure Clear;
786      property Modified: Boolean read GetModified;
787      property Params[index: integer]: ISQLParam read getSQLParam; default;
788      property Count: integer read getCount;
# Line 876 | Line 907 | type
907  
908    TTransactionAction  = (TARollback, TACommit, TACommitRetaining, TARollbackRetaining);
909    TTransactionCompletion = TARollback.. TACommit;
910 +  TTrCompletionState = (trCommitted, trRolledback, trCommitFailed, trRollbackFailed);
911 +
912  
913    ITransaction = interface
914      ['{30928d0e-a9d7-4c61-b7cf-14f4f38abe2a}']
# Line 887 | Line 920 | type
920      function GetJournalingActive(attachment: IAttachment): boolean;
921      function GetDefaultCompletion: TTransactionCompletion;
922      procedure PrepareForCommit; {Two phase commit - stage 1}
923 <    procedure Commit(Force: boolean=false);
923 >    function Commit(Force: boolean=false): TTrCompletionState;
924      procedure CommitRetaining;
925      function HasActivity: boolean;
926 <    procedure Rollback(Force: boolean=false);
926 >    function Rollback(Force: boolean=false): TTrCompletionState;
927      procedure RollbackRetaining;
928      function GetAttachmentCount: integer;
929      function GetAttachment(index: integer): IAttachment;
# Line 929 | Line 962 | type
962      ['{6a0be233-ed08-4524-889c-2e45d0c20e5f}']
963      procedure GetEvents(EventNames: TStrings);
964      procedure SetEvents(EventNames: TStrings); overload;
965 <    procedure SetEvents(EventName: AnsiString); overload;
965 >    procedure SetEvents(EventName: string); overload;
966      procedure Cancel;
967      function ExtractEventCounts: TEventCounts;
968      procedure WaitForEvent;
# Line 1065 | Line 1098 | type
1098     {Journaling options. Default is [joReadWriteTransactions,joModifyQueries] }
1099  
1100     TJournalOption = (joReadOnlyTransactions, joReadWriteTransactions,
1101 <                     joModifyQueries, joReadOnlyQueries);
1101 >                     joModifyQueries, joReadOnlyQueries,joNoServerTable);
1102  
1103     TJournalOptions = set of TJournalOption;
1104  
# Line 1199 | Line 1232 | type
1232      function HasDecFloatSupport: boolean;
1233      function HasBatchMode: boolean;
1234      function HasScollableCursors: boolean;
1235 <    function HasTable(aTableName: AnsiString): boolean;
1235 >    function HasTable(aTableName: AnsiString): boolean;  {case sensitive}
1236 >    function HasFunction(aFunctionName: AnsiString): boolean; {case sensitive}
1237 >    function HasProcedure(aProcName: AnsiString): boolean; {case sensitive}
1238  
1239      {Character Sets}
1240 +    function GetCharSetID: integer; {connection character set}
1241      function HasDefaultCharSet: boolean;
1242      function GetDefaultCharSetID: integer;
1243      function GetCharsetName(CharSetID: integer): AnsiString;
# Line 1221 | Line 1257 | type
1257      function GetJournalOptions: TJournalOptions;
1258      function StartJournaling(aJournalLogFile: AnsiString): integer; overload;
1259      function StartJournaling(aJournalLogFile: AnsiString; Options: TJournalOptions): integer; overload;
1260 +    function StartJournaling(S: TStream; Options: TJournalOptions): integer; overload;
1261      procedure StopJournaling(RetainJournal: boolean);
1262   end;
1263  
# Line 1443 | Line 1480 | type
1480     EIBInterBaseError = class(EIBError)
1481     private
1482       FIBErrorCode: Long;
1483 +     FStatus: IStatus;
1484     public
1485 <     constructor Create(Status: IStatus); overload;
1485 >     constructor Create(aStatus: IStatus); overload;
1486       constructor Create(ASQLCode: Long; AIBErrorCode: Long; Msg: AnsiString); overload;
1487       property IBErrorCode: Long read FIBErrorCode;
1488 +     property Status: IStatus read FStatus;
1489     end;
1490  
1491     {IB Client Exceptions}
# Line 1475 | Line 1514 | procedure CheckIBLoaded;
1514  
1515   function LoadFBLibrary(aLibPathName: string): IFirebirdLibrary;
1516  
1517 < {$if not declared(NULL)} {Needed for Delphi}
1517 > {$if not declared(Null)} {Needed for Delphi}
1518   function Null: Variant;       // Null standard constant
1519   {$define NEEDNULLFUNCTION}
1520   {$ifend}
# Line 1574 | Line 1613 | end;
1613  
1614   { EIBInterBaseError }
1615  
1616 < constructor EIBInterBaseError.Create(Status: IStatus);
1616 > constructor EIBInterBaseError.Create(aStatus: IStatus);
1617   begin
1618 <  inherited Create(Status.Getsqlcode,Status.GetMessage);
1619 <  FIBErrorCode := Status.GetIBErrorCode;
1618 >  inherited Create(aStatus.Getsqlcode,aStatus.GetMessage);
1619 >  FIBErrorCode := aStatus.GetIBErrorCode;
1620 >  FStatus := aStatus.Clone;
1621   end;
1622  
1623   constructor EIBInterBaseError.Create(ASQLCode: Long; AIBErrorCode: Long;

Comparing:
ibx/branches/journaling/fbintf/IB.pas (property svn:eol-style), Revision 363 by tony, Tue Dec 7 13:30:05 2021 UTC vs.
ibx/branches/udr/client/IB.pas (property svn:eol-style), Revision 390 by tony, Sat Jan 22 16:15:12 2022 UTC

# Line 0 | Line 1
1 + native

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines