Skip to main content

QueryResult

The object resolved by SqbClient.execute() and SqbConnection.execute(). See Executing Queries for the full usage guide.

interface QueryResult {
executeTime: number;
fields?: FieldInfoMap;
rows?: any;
rowType?: 'array' | 'object';
query?: QueryRequest;
returns?: any;
rowsAffected?: number;
cursor?: Cursor;
}
FieldTypeDescription
executeTimenumberMilliseconds the query took, measured around the adapter call.
fieldsFieldInfoMapColumn metadata, populated for statements that return rows. Look up a field by name with result.fields.get('columnName').
rowsanyThe fetched rows (object or array rows, per rowType/objectRows) — absent when cursor: true was requested.
rowType'array' | 'object'The row shape reported by the adapter before naming/object normalization.
queryQueryRequestThe executed request (SQL, params, effective options) — only populated when showSql: true.
returnsanyAdapter-specific return value passthrough.
rowsAffectednumberAffected-row count, populated for statements like UPDATE/DELETE.
cursorCursorPopulated instead of rows when cursor: true was requested — see Cursors & Streaming.