Skip to main content

ClientDefaults

ClientDefaults sets the fallback values used to resolve QueryExecuteOptions whenever a given option isn't passed to a specific execute() call. Pass it as ClientConfiguration.defaults. See Executing Queries for the full option-resolution table and the verified runtime defaults.

interface ClientDefaults {
autoCommit?: boolean;
cursor?: boolean;
objectRows?: boolean;
fieldNaming?: FieldNaming;
showSql?: boolean;
prettyPrint?: boolean;
ignoreNulls?: boolean;
fetchRows?: number;
transform?: ValueTransformFunction;
}
FieldTypeRuntime default if unsetDescription
autoCommitbooleantrue (outside a transaction)See the autoCommit note — a stale inline comment in the source claims false.
cursorbooleanfalseWhether queries return a Cursor instead of buffered rows.
objectRowsbooleantrueA stale inline comment in the source claims "driver default"; the actual fallback is hard-coded to true.
fieldNamingFieldNamingnone (original names)Renaming strategy applied to result field names.
showSqlbooleanfalseWhether QueryResult.query is populated with the executed request.
prettyPrintbooleanfalseWhether generated SQL is pretty-printed.
ignoreNullsbooleanfalseDrops null fields from object rows; forced to false whenever objectRows is false.
fetchRowsnumber100A stale inline comment in the source claims 10; the actual fallback coded in _prepareQueryRequest() is 100.
transformValueTransformFunctionnone(value: any, fieldInfo?: FieldInfo) => any run over every field value as rows are normalized.