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

Comparing ibx/trunk/fbintf/client/FBStatement.pas (file contents):
Revision 47 by tony, Mon Jan 9 15:31:51 2017 UTC vs.
Revision 56 by tony, Mon Mar 6 10:20:02 2017 UTC

# Line 28 | Line 28
28   *
29   *)
30   unit FBStatement;
31 + {$IFDEF MSWINDOWS}
32 + {$DEFINE WINDOWS}
33 + {$ENDIF}
34  
35   {$IFDEF FPC}
36 < {$mode objfpc}{$H+}
36 > {$mode delphi}
37   {$codepage UTF8}
38   {$interfaces COM}
39   {$ENDIF}
# Line 42 | Line 45 | uses
45    FBTransaction;
46  
47   type
48 <  TPerfStatistics = array[psCurrentMemory..psFetches] of Int64;
48 >  TPerfStatistics = array[psCurrentMemory..psFetches] of comp;
49  
50    { TFBStatement }
51  
# Line 57 | Line 60 | type
60      FOpen: boolean;
61      FPrepared: boolean;
62      FPrepareSeqNo: integer; {used to check for out of date references from interfaces}
63 <    FSQL: string;
64 <    FProcessedSQL: string;
63 >    FSQL: AnsiString;
64 >    FProcessedSQL: AnsiString;
65      FHasParamNames: boolean;
66      FBOF: boolean;
67      FEOF: boolean;
# Line 79 | Line 82 | type
82      procedure InternalClose(Force: boolean); virtual; abstract;
83    public
84      constructor Create(Attachment: IAttachment; Transaction: ITransaction;
85 <      sql: string; SQLDialect: integer);
85 >      sql: AnsiString; SQLDialect: integer);
86      constructor CreateWithParameterNames(Attachment: IAttachment; Transaction: ITransaction;
87 <      sql: string;  SQLDialect: integer; GenerateParamNames: boolean =false);
87 >      sql: AnsiString;  SQLDialect: integer; GenerateParamNames: boolean =false);
88      destructor Destroy; override;
89      procedure Close;
90      procedure TransactionEnding(aTransaction: ITransaction; Force: boolean);
# Line 93 | Line 96 | type
96      function GetRowsAffected(var SelectCount, InsertCount, UpdateCount,
97        DeleteCount: integer): boolean;
98      function GetSQLStatementType: TIBSQLStatementTypes;
99 <    function GetSQLText: string;
99 >    function GetSQLText: AnsiString;
100      function GetSQLDialect: integer;
101  
102      {GetDSQLInfo only supports isc_info_sql_stmt_type, isc_info_sql_get_plan, isc_info_sql_records}
103      procedure Prepare(aTransaction: ITransaction=nil); virtual;
104      function Execute(aTransaction: ITransaction=nil): IResults;
105      function OpenCursor(aTransaction: ITransaction=nil): IResultSet;
106 <    function CreateBlob(paramName: string): IBlob; overload;
106 >    function CreateBlob(paramName: AnsiString): IBlob; overload;
107      function CreateBlob(index: integer): IBlob; overload;
108      function CreateBlob(column: TColumnMetaData): IBlob; overload; virtual; abstract;
109 <    function CreateArray(paramName: string): IArray; overload;
109 >    function CreateArray(paramName: AnsiString): IArray; overload;
110      function CreateArray(index: integer): IArray;  overload;
111      function CreateArray(column: TColumnMetaData): IArray; overload; virtual; abstract;
112      function GetAttachment: IAttachment;
# Line 133 | Line 136 | begin
136   end;
137  
138   constructor TFBStatement.Create(Attachment: IAttachment;
139 <  Transaction: ITransaction; sql: string; SQLDialect: integer);
139 >  Transaction: ITransaction; sql: AnsiString; SQLDialect: integer);
140   begin
141    inherited Create(Transaction as TFBTransaction,2);
142    FAttachmentIntf := Attachment;
# Line 143 | Line 146 | begin
146   end;
147  
148   constructor TFBStatement.CreateWithParameterNames(Attachment: IAttachment;
149 <  Transaction: ITransaction; sql: string; SQLDialect: integer;
149 >  Transaction: ITransaction; sql: AnsiString; SQLDialect: integer;
150    GenerateParamNames: boolean);
151   begin
152    FHasParamNames := true;
# Line 214 | Line 217 | begin
217    Result := FSQLStatementType;
218   end;
219  
220 < function TFBStatement.GetSQLText: string;
220 > function TFBStatement.GetSQLText: AnsiString;
221   begin
222    Result := FSQL;
223   end;
# Line 253 | Line 256 | begin
256      Result := InternalOpenCursor(aTransaction);
257   end;
258  
259 < function TFBStatement.CreateBlob(paramName: string): IBlob;
259 > function TFBStatement.CreateBlob(paramName: AnsiString): IBlob;
260   var column: TColumnMetaData;
261   begin
262    InternalPrepare;
# Line 269 | Line 272 | begin
272    Result := CreateBlob(SQLParams[index] as TSQLParam);
273   end;
274  
275 < function TFBStatement.CreateArray(paramName: string): IArray;
275 > function TFBStatement.CreateArray(paramName: AnsiString): IArray;
276   var column: TColumnMetaData;
277   begin
278    InternalPrepare;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines