query Method

Deprecated  in 3.7. Use IModelConnection.createQueryReader instead; it accepts the same parameters.

Execute a query and stream its results The result of the query is async iterator over the rows. The iterator will get next page automatically once rows in current page has been read. ECSQL row.

See also:

query(ecsql: string, params?: QueryBinder, options?: QueryOptions): AsyncIterableIterator<any>

@returns Returns the query result as an AsyncIterableIterator which lazy load result as needed. The row format is determined by rowFormat parameter. See ECSQL row format for details about the format of the returned rows.

@throws IModelError If there was any error while submitting, preparing or stepping into query

Parameter Type Description
ecsql string The ECSQL statement to execute
params QueryBinder The values to bind to the parameters (if the ECSQL has any).
options QueryOptions Allow to specify certain flags which control how query is executed.

Returns - AsyncIterableIterator<any>

Returns the query result as an AsyncIterableIterator which lazy load result as needed. The row format is determined by rowFormat parameter. See ECSQL row format for details about the format of the returned rows.

Defined in

Last Updated: 16 April, 2024