withStatement Method
Prepared and execute a callback on an ECSQL statement. After the callback completes the statement is disposed. Use this method for ECSQL statements are either not expected to be reused, or are not expensive to prepare. For statements that will be reused often, instead use withPreparedStatement.
withStatement<T>(ecsql: string, callback: (stmt: ECSqlStatement) => T, logErrors: booleantrue): T
@returns the value returned by callback
.
Parameter | Type | Description |
---|---|---|
ecsql | string | |
callback | (stmt: ECSqlStatement) => T | the callback to invoke on the prepared statement |
logErrors | boolean | Determines if error will be logged if statement fail to prepare |
Returns - T
the value returned by callback
.
Defined in
- core/backend/src/IModelDb.ts Line 446
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.