Skip to main content

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[];
}
FieldTypeRuntime defaultDescription
paramsRecord<string, any> | any[]nonePositional array or named-parameter object.
autoCommitbooleantrue (outside a transaction; forced false inside one)See the autoCommit note.
cursorbooleanfalseReturn a Cursor instead of buffered rows.
transformValueTransformFunctionnone(value, fieldInfo?) => any, run over every field value.
fetchRowsnumber100Max rows fetched (regular mode) or prefetch batch size (cursor mode).
ignoreNullsbooleanfalseDrops null fields from object rows; forced false when objectRows is false.
namingStrategyFieldNamingnone (original names)Renaming strategy applied to result field names.
objectRowsbooleantrueReturn rows as objects (true) or arrays (false).
showSqlbooleanfalsePopulate QueryResult.query with the executed request.
prettyPrintbooleanfalsePretty-print generated SQL.
actionstring''Free-form label attached to the request.
fetchAsStringDataType[]noneDataTypes the adapter should coerce to string.