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

Comparing:
ibx/trunk/fbintf/client/FBAttachment.pas (file contents), Revision 345 by tony, Mon Aug 23 14:22:29 2021 UTC vs.
ibx/branches/journaling/fbintf/client/FBAttachment.pas (file contents), Revision 362 by tony, Tue Dec 7 13:27:39 2021 UTC

# Line 101 | Line 101 | type
101      function ExecuteSQL(transaction: ITransaction; sql: AnsiString; SQLDialect: integer; params: array of const): IResults; overload;
102      function ExecuteSQL(TPB: array of byte; sql: AnsiString; params: array of const): IResults; overload;
103      function ExecuteSQL(transaction: ITransaction; sql: AnsiString; params: array of const): IResults; overload;
104 <    function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IResultSet; overload;
104 >    function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer;
105 >                             Scrollable: boolean=false): IResultSet; overload;
106      function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer;
107                               params: array of const): IResultSet; overload;
108 <    function OpenCursor(transaction: ITransaction; sql: AnsiString): IResultSet; overload;
108 >    function OpenCursor(transaction: ITransaction; sql: AnsiString; Scrollable: boolean=false): IResultSet; overload;
109      function OpenCursor(transaction: ITransaction; sql: AnsiString;
110                               params: array of const): IResultSet; overload;
111 <    function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IResultSet; overload;
111 >    function OpenCursor(transaction: ITransaction; sql: AnsiString; Scrollable: boolean;
112 >                             params: array of const): IResultSet; overload;
113 >    function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; Scrollable: boolean;
114 >                             params: array of const): IResultSet; overload;
115      function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer;
116 +                             Scrollable: boolean=false): IResultSet; overload;
117 +    function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer;
118 +                             params: array of const): IResultSet; overload;
119 +    function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; Scrollable: boolean;
120                               params: array of const): IResultSet; overload;
121 <    function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString): IResultSet; overload;
121 >    function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; Scrollable: boolean=false): IResultSet; overload;
122      function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString;
123                               params: array of const): IResultSet; overload;
124 <    function OpenCursorAtStart(sql: AnsiString): IResultSet; overload;
124 >    function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; Scrollable: boolean;
125 >                             params: array of const): IResultSet; overload;
126 >    function OpenCursorAtStart(sql: AnsiString;Scrollable: boolean=false): IResultSet; overload;
127 >    function OpenCursorAtStart(sql: AnsiString; Scrollable: boolean;
128 >                             params: array of const): IResultSet; overload;
129      function OpenCursorAtStart(sql: AnsiString;
130                               params: array of const): IResultSet; overload;
131 <    function Prepare(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IStatement; overload; virtual; abstract;
132 <    function Prepare(transaction: ITransaction; sql: AnsiString): IStatement; overload;
131 >    function Prepare(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; CursorName: AnsiString=''): IStatement; overload; virtual; abstract;
132 >    function Prepare(transaction: ITransaction; sql: AnsiString; CursorName: AnsiString=''): IStatement; overload;
133      function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString;
134                         aSQLDialect: integer; GenerateParamNames: boolean=false;
135 <                       CaseSensitiveParams: boolean = false): IStatement; overload; virtual; abstract;
135 >                       CaseSensitiveParams: boolean = false; CursorName: AnsiString=''): IStatement; overload; virtual; abstract;
136      function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString;
137                         GenerateParamNames: boolean=false;
138 <                       CaseSensitiveParams: boolean = false): IStatement; overload;
138 >                       CaseSensitiveParams: boolean = false; CursorName: AnsiString=''): IStatement; overload;
139      function GetEventHandler(Events: TStrings): IEvents; overload; virtual; abstract;
140      function GetEventHandler(Event: AnsiString): IEvents; overload;
141  
# Line 677 | Line 689 | begin
689   end;
690  
691   function TFBAttachment.OpenCursor(transaction: ITransaction; sql: AnsiString;
692 <  aSQLDialect: integer): IResultSet;
692 >  aSQLDialect: integer; Scrollable: boolean): IResultSet;
693   begin
694 <  Result := OpenCursor(transaction,sql,aSQLDialect,[]);
694 >  Result := OpenCursor(transaction,sql,aSQLDialect,Scrollable,[]);
695   end;
696  
697   function TFBAttachment.OpenCursor(transaction: ITransaction; sql: AnsiString;
698    aSQLDialect: integer; params: array of const): IResultSet;
699 < var Statement: IStatement;
699 >
700   begin
701 <  CheckHandle;
690 <  Statement := Prepare(transaction,sql,aSQLDialect);
691 <  SetParameters(Statement.SQLParams,params);
692 <  Result := Statement.OpenCursor;
701 >  Result := OpenCursor(transaction,sql,FSQLDialect,false,params);
702   end;
703  
704 < function TFBAttachment.OpenCursor(transaction: ITransaction; sql: AnsiString
705 <  ): IResultSet;
704 > function TFBAttachment.OpenCursor(transaction: ITransaction; sql: AnsiString;
705 >  Scrollable: boolean): IResultSet;
706 > begin
707 >  Result := OpenCursor(transaction,sql,FSQLDialect,Scrollable,[]);
708 > end;
709 >
710 > function TFBAttachment.OpenCursor(transaction: ITransaction; sql: AnsiString;
711 >  params: array of const): IResultSet;
712 > begin
713 >  Result := OpenCursor(transaction,sql,FSQLDialect,false,params);
714 > end;
715 >
716 > function TFBAttachment.OpenCursor(transaction: ITransaction; sql: AnsiString;
717 >  Scrollable: boolean; params: array of const): IResultSet;
718   begin
719 <  Result := OpenCursor(transaction,sql,FSQLDialect,[]);
719 >  Result := OpenCursor(transaction,sql,FSQLDialect,Scrollable,params);
720   end;
721  
722   function TFBAttachment.OpenCursor(transaction: ITransaction; sql: AnsiString;
723 +  aSQLDialect: integer; Scrollable: boolean;
724    params: array of const): IResultSet;
725 + var Statement: IStatement;
726   begin
727 <  Result := OpenCursor(transaction,sql,FSQLDialect,params);
727 >  CheckHandle;
728 >  Statement := Prepare(transaction,sql,aSQLDialect);
729 >  SetParameters(Statement.SQLParams,params);
730 >  Result := Statement.OpenCursor(Scrollable);
731   end;
732  
733   function TFBAttachment.OpenCursorAtStart(transaction: ITransaction;
734 <  sql: AnsiString; aSQLDialect: integer): IResultSet;
734 >  sql: AnsiString; aSQLDialect: integer; Scrollable: boolean): IResultSet;
735   begin
736 <  Result := OpenCursor(transaction,sql,aSQLDialect,[]);
736 >  Result := OpenCursor(transaction,sql,aSQLDialect,Scrollable,[]);
737    Result.FetchNext;
738   end;
739  
# Line 718 | Line 744 | begin
744    Result.FetchNext;
745   end;
746  
747 < function TFBAttachment.OpenCursorAtStart(transaction: ITransaction; sql: AnsiString
748 <  ): IResultSet;
747 > function TFBAttachment.OpenCursorAtStart(transaction: ITransaction;
748 >  sql: AnsiString; aSQLDialect: integer; Scrollable: boolean;
749 >  params: array of const): IResultSet;
750 > begin
751 >  Result := OpenCursor(transaction,sql,aSQLDialect,Scrollable,params);
752 >  Result.FetchNext;
753 > end;
754 >
755 > function TFBAttachment.OpenCursorAtStart(transaction: ITransaction;
756 >  sql: AnsiString; Scrollable: boolean): IResultSet;
757   begin
758 <  Result := OpenCursorAtStart(transaction,sql,FSQLDialect,[]);
758 >  Result := OpenCursorAtStart(transaction,sql,FSQLDialect,Scrollable,[]);
759   end;
760  
761   function TFBAttachment.OpenCursorAtStart(transaction: ITransaction;
# Line 730 | Line 764 | begin
764    Result := OpenCursorAtStart(transaction,sql,FSQLDialect,params);
765   end;
766  
767 < function TFBAttachment.OpenCursorAtStart(sql: AnsiString): IResultSet;
767 > function TFBAttachment.OpenCursorAtStart(transaction: ITransaction;
768 >  sql: AnsiString; Scrollable: boolean; params: array of const): IResultSet;
769 > begin
770 >  Result := OpenCursorAtStart(transaction,sql,FSQLDialect,Scrollable,params);
771 > end;
772 >
773 > function TFBAttachment.OpenCursorAtStart(sql: AnsiString; Scrollable: boolean
774 >  ): IResultSet;
775 > begin
776 >  Result := OpenCursorAtStart(sql,Scrollable,[]);
777 > end;
778 >
779 > function TFBAttachment.OpenCursorAtStart(sql: AnsiString; Scrollable: boolean;
780 >  params: array of const): IResultSet;
781   begin
782 <  Result := OpenCursorAtStart(sql,[]);
782 >  Result := OpenCursorAtStart(StartTransaction([isc_tpb_read,isc_tpb_wait,isc_tpb_concurrency],taCommit),sql,FSQLDialect,
783 >                   Scrollable,params);
784   end;
785  
786   function TFBAttachment.OpenCursorAtStart(sql: AnsiString;
787    params: array of const): IResultSet;
788   begin
789 <  Result := OpenCursorAtStart(StartTransaction([isc_tpb_read,isc_tpb_wait,isc_tpb_concurrency],taCommit),sql,FSQLDialect,params);
789 >  Result := OpenCursorAtStart(StartTransaction([isc_tpb_read,isc_tpb_wait,isc_tpb_concurrency],taCommit),sql,FSQLDialect,
790 >                   false,params);
791   end;
792  
793 < function TFBAttachment.Prepare(transaction: ITransaction; sql: AnsiString
794 <  ): IStatement;
793 > function TFBAttachment.Prepare(transaction: ITransaction; sql: AnsiString;
794 >  CursorName: AnsiString): IStatement;
795   begin
796 <  Result := Prepare(transaction,sql,FSQLDialect);
796 >  Result := Prepare(transaction,sql,FSQLDialect,CursorName);
797   end;
798  
799   function TFBAttachment.PrepareWithNamedParameters(transaction: ITransaction;
800 <  sql: AnsiString; GenerateParamNames: boolean; CaseSensitiveParams: boolean): IStatement;
800 >  sql: AnsiString; GenerateParamNames: boolean; CaseSensitiveParams: boolean;
801 >  CursorName: AnsiString): IStatement;
802   begin
803 <  Result := PrepareWithNamedParameters(transaction,sql,FSQLDialect,GenerateParamNames,CaseSensitiveParams);
803 >  Result := PrepareWithNamedParameters(transaction,sql,FSQLDialect,GenerateParamNames,CaseSensitiveParams,CursorName);
804   end;
805  
806   function TFBAttachment.GetEventHandler(Event: AnsiString): IEvents;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines