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

Comparing ibx/trunk/fbintf/client/FBStatement.pas (file contents):
Revision 209 by tony, Wed Mar 14 12:48:51 2018 UTC vs.
Revision 263 by tony, Thu Dec 6 15:55:01 2018 UTC

# Line 52 | Line 52 | type
52    TFBStatement = class(TActivityReporter)
53    private
54      FAttachmentIntf: IAttachment;
55 +    FFirebirdClientAPI: TFBClientAPI;
56    protected
57      FTransactionIntf: ITransaction;
58      FExecTransactionIntf: ITransaction;
# Line 78 | Line 79 | type
79      procedure InternalPrepare;  virtual; abstract;
80      function InternalExecute(aTransaction: ITransaction): IResults;  virtual; abstract;
81      function InternalOpenCursor(aTransaction: ITransaction): IResultSet;   virtual; abstract;
82 +    procedure ProcessSQL(sql: AnsiString; GenerateParamNames: boolean; var processedSQL: AnsiString); virtual; abstract;
83      procedure FreeHandle;  virtual; abstract;
84      procedure InternalClose(Force: boolean); virtual; abstract;
85      function TimeStampToMSecs(const TimeStamp: TTimeStamp): Int64;
# Line 90 | Line 92 | type
92      procedure Close;
93      procedure TransactionEnding(aTransaction: ITransaction; Force: boolean);
94      property SQLDialect: integer read FSQLDialect;
95 +    property FirebirdClientAPI: TFBClientAPI read FFirebirdClientAPI;
96  
97    public
98      function GetSQLParams: ISQLParams; virtual; abstract;
# Line 98 | Line 101 | type
101        DeleteCount: integer): boolean;
102      function GetSQLStatementType: TIBSQLStatementTypes;
103      function GetSQLText: AnsiString;
104 +    function GetProcessedSQLText: AnsiString;
105      function GetSQLDialect: integer;
106  
107      {GetDSQLInfo only supports isc_info_sql_stmt_type, isc_info_sql_get_plan, isc_info_sql_records}
# Line 147 | Line 151 | begin
151    inherited Create(Transaction as TFBTransaction,2);
152    FAttachmentIntf := Attachment;
153    FTransactionIntf := Transaction;
154 +  FFirebirdClientAPI := Attachment.getFirebirdAPI as TFBClientAPI;
155    FSQLDialect := SQLDialect;
156    FSQL := sql;
157   end;
# Line 228 | Line 233 | begin
233    Result := FSQL;
234   end;
235  
236 + function TFBStatement.GetProcessedSQLText: AnsiString;
237 + begin
238 +  if FProcessedSQL = '' then
239 +    ProcessSQL(FSQL,FGenerateParamNames,FProcessedSQL);
240 +  Result := FProcessedSQL
241 + end;
242 +
243   function TFBStatement.GetSQLDialect: integer;
244   begin
245    Result := FSQLDialect;
# Line 306 | Line 318 | end;
318  
319   function TFBStatement.GetDSQLInfo(Request: byte): ISQLInfoResults;
320   begin
321 <  Result := TSQLInfoResultsBuffer.Create;
321 >  Result := TSQLInfoResultsBuffer.Create(FFirebirdClientAPI);
322    GetDsqlInfo(Request,Result);
323   end;
324  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines