deno.com

method StatementSync.prototype.iterate

Overload 1

#StatementSync.prototype.iterate(...anonymousParameters: SQLInputValue[]): Iterator<Record<string, SQLOutputValue>>

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

Parameters #

#<span>...anonymousParameters</span>: SQLInputValue[]

Return Type #

Iterator<Record<string, SQLOutputValue>>

An iterable iterator 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.

Overload 2

#StatementSync.prototype.iterate(
namedParameters: Record<string, SQLInputValue>,
...anonymousParameters: SQLInputValue[],
): Iterator<Record<string, SQLOutputValue>>

Parameters #

#namedParameters: Record<string, SQLInputValue>
#<span>...anonymousParameters</span>: SQLInputValue[]

Return Type #

Iterator<Record<string, SQLOutputValue>>