83 |
|
procedure CheckHandle; virtual; abstract; |
84 |
|
procedure CheckTransaction(aTransaction: ITransaction); |
85 |
|
procedure GetDsqlInfo(info_request: byte; buffer: ISQLInfoResults); overload; virtual; abstract; |
86 |
< |
procedure InternalPrepare; virtual; abstract; |
86 |
> |
procedure InternalPrepare(CursorName: AnsiString=''); virtual; abstract; |
87 |
|
function InternalExecute(Transaction: ITransaction): IResults; virtual; abstract; |
88 |
< |
function InternalOpenCursor(aTransaction: ITransaction): IResultSet; virtual; abstract; |
88 |
> |
function InternalOpenCursor(aTransaction: ITransaction; Scrollable: boolean): IResultSet; virtual; abstract; |
89 |
|
procedure ProcessSQL(sql: AnsiString; GenerateParamNames: boolean; var processedSQL: AnsiString); virtual; abstract; |
90 |
|
procedure FreeHandle; virtual; abstract; |
91 |
|
procedure InternalClose(Force: boolean); virtual; abstract; |
112 |
|
function GetSQLText: AnsiString; |
113 |
|
function GetProcessedSQLText: AnsiString; |
114 |
|
function GetSQLDialect: integer; |
115 |
+ |
function GetFlags: TStatementFlags; virtual; |
116 |
|
|
117 |
|
{GetDSQLInfo only supports isc_info_sql_stmt_type, isc_info_sql_get_plan, isc_info_sql_records} |
118 |
< |
procedure Prepare(aTransaction: ITransaction=nil); virtual; |
118 |
> |
procedure Prepare(aTransaction: ITransaction=nil); overload; |
119 |
> |
procedure Prepare(CursorName: AnsiString; aTransaction: ITransaction=nil); overload; virtual; |
120 |
|
function Execute(aTransaction: ITransaction=nil): IResults; |
121 |
< |
function OpenCursor(aTransaction: ITransaction=nil): IResultSet; |
121 |
> |
function OpenCursor(aTransaction: ITransaction=nil): IResultSet; overload; |
122 |
> |
function OpenCursor(Scrollable: boolean; aTransaction: ITransaction=nil): IResultSet; overload; |
123 |
|
function CreateBlob(paramName: AnsiString): IBlob; overload; |
124 |
|
function CreateBlob(index: integer): IBlob; overload; |
125 |
|
function CreateBlob(column: TColumnMetaData): IBlob; overload; virtual; abstract; |
290 |
|
|
291 |
|
function TFBStatement.GetProcessedSQLText: AnsiString; |
292 |
|
begin |
293 |
< |
if FProcessedSQL = '' then |
294 |
< |
ProcessSQL(FSQL,FGenerateParamNames,FProcessedSQL); |
295 |
< |
Result := FProcessedSQL |
293 |
> |
if not FHasParamNames then |
294 |
> |
Result := FSQL |
295 |
> |
else |
296 |
> |
begin |
297 |
> |
if FProcessedSQL = '' then |
298 |
> |
ProcessSQL(FSQL,FGenerateParamNames,FProcessedSQL); |
299 |
> |
Result := FProcessedSQL; |
300 |
> |
end; |
301 |
|
end; |
302 |
|
|
303 |
|
function TFBStatement.GetSQLDialect: integer; |
305 |
|
Result := FSQLDialect; |
306 |
|
end; |
307 |
|
|
308 |
+ |
function TFBStatement.GetFlags: TStatementFlags; |
309 |
+ |
begin |
310 |
+ |
Result := []; |
311 |
+ |
end; |
312 |
+ |
|
313 |
|
procedure TFBStatement.Prepare(aTransaction: ITransaction); |
314 |
|
begin |
315 |
+ |
Prepare('',aTransaction); |
316 |
+ |
end; |
317 |
+ |
|
318 |
+ |
procedure TFBStatement.Prepare(CursorName: AnsiString; |
319 |
+ |
aTransaction: ITransaction); |
320 |
+ |
begin |
321 |
|
if FPrepared then FreeHandle; |
322 |
|
if aTransaction <> nil then |
323 |
|
begin |
325 |
|
FTransactionIntf := aTransaction; |
326 |
|
AddMonitor(FTransactionIntf as TFBTransaction); |
327 |
|
end; |
328 |
< |
InternalPrepare; |
328 |
> |
InternalPrepare(CursorName); |
329 |
|
end; |
330 |
|
|
331 |
|
function TFBStatement.Execute(aTransaction: ITransaction): IResults; |
380 |
|
|
381 |
|
function TFBStatement.OpenCursor(aTransaction: ITransaction): IResultSet; |
382 |
|
begin |
383 |
+ |
Result := OpenCursor(false,aTransaction); |
384 |
+ |
end; |
385 |
+ |
|
386 |
+ |
function TFBStatement.OpenCursor(Scrollable: boolean; aTransaction: ITransaction |
387 |
+ |
): IResultSet; |
388 |
+ |
begin |
389 |
|
Close; |
390 |
|
if aTransaction = nil then |
391 |
< |
Result := InternalOpenCursor(FTransactionIntf) |
391 |
> |
Result := InternalOpenCursor(FTransactionIntf,Scrollable) |
392 |
|
else |
393 |
< |
Result := InternalOpenCursor(aTransaction); |
393 |
> |
Result := InternalOpenCursor(aTransaction,Scrollable); |
394 |
|
end; |
395 |
|
|
396 |
|
function TFBStatement.CreateBlob(paramName: AnsiString): IBlob; |