QueryExecuteOptions
The options object accepted by
SqbClient.execute() and
SqbConnection.execute(). See
Executing Queries for the full
default-resolution table (client/connection default → ClientDefaults → hard-coded runtime
default) and the corrections to several stale JSDoc comments in the source.
interface QueryExecuteOptions {
params?: Record<string, any> | any[];
autoCommit?: boolean;
cursor?: boolean;
transform?: ValueTransformFunction;
fetchRows?: number;
ignoreNulls?: boolean;
namingStrategy?: FieldNaming;
objectRows?: boolean;
showSql?: boolean;
prettyPrint?: boolean;
action?: string;
fetchAsString?: DataType[];
}
| Field | Type | Runtime default | Description |
|---|---|---|---|
params | Record<string, any> | any[] | none | Positional array or named-parameter object. |
autoCommit | boolean | true (outside a transaction; forced false inside one) | See the autoCommit note. |
cursor | boolean | false | Return a Cursor instead of buffered rows. |
transform | ValueTransformFunction | none | (value, fieldInfo?) => any, run over every field value. |
fetchRows | number | 100 | Max rows fetched (regular mode) or prefetch batch size (cursor mode). |
ignoreNulls | boolean | false | Drops null fields from object rows; forced false when objectRows is false. |
namingStrategy | FieldNaming | none (original names) | Renaming strategy applied to result field names. |
objectRows | boolean | true | Return rows as objects (true) or arrays (false). |
showSql | boolean | false | Populate QueryResult.query with the executed request. |
prettyPrint | boolean | false | Pretty-print generated SQL. |
action | string | '' | Free-form label attached to the request. |
fetchAsString | DataType[] | none | DataTypes the adapter should coerce to string. |