Skip to main content

all

method StatementSync.prototype.all
Jump to headingStatementSync.prototype.all(...anonymousParameters: SupportedValueType[]): unknown[]

This method executes a prepared statement and returns all results as an array of objects. If the prepared statement does not return any results, this method returns an empty array. The prepared statement parameters are bound using the values in namedParameters and anonymousParameters.

Parameters Jump to heading

Jump to heading<span>...anonymousParameters</span>: SupportedValueType[]

Return Type Jump to heading

unknown[]

An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of the row.

Jump to headingStatementSync.prototype.all(
namedParameters: Record<string, SupportedValueType>,
...anonymousParameters: SupportedValueType[],
): unknown[]

Parameters Jump to heading

Jump to headingnamedParameters: Record<string, SupportedValueType>
Jump to heading<span>...anonymousParameters</span>: SupportedValueType[]

Return Type Jump to heading

unknown[]
Back to top