Miterate
Bun

method

sqlite.StatementSync.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.

@param anonymousParameters

Zero or more values to bind to anonymous parameters.

@returns

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.

namedParameters: Record<string, SQLInputValue>,
...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.

@param namedParameters

An optional object used to bind named parameters. The keys of this object are used to configure the mapping.

@param anonymousParameters

Zero or more values to bind to anonymous parameters.

@returns

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.

Referenced types

type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView
type SQLOutputValue = null | number | bigint | string | Uint8Array