QueryLazy()
Executes a SQL query without loading the data entirely to memory. Instead it calls the given Function with every single row
QueryLazy( sql=string, listener=function, params=any, options=struct );
Returns: void
| Argument | Description |
|---|---|
|
sql
string,
required
|
edit
SQL to execute |
|
listener
function,
required
|
edit
listener function that will be called with the data of every single row. if returns false, execution is stopped. |
|
params
any,
optional
|
edit
Array or Struct of parameter values. When passing an array use ? as place holders. When passing a struct use :keyName where keyName is the name of the key in the structure corresponding to the parameter. The struct or array can be a struct with keys such as the following: cfsqltype, list Alias: param |
|
options
struct,
optional
|
edit
Struct containing query options, all cfquery tag attributes are supported except the name attribute. Alias: option, queryOptions |
Examples
There are currently no examples for this function 39,211ms WARN No examples for function QueryLazySee also
- Queries
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)