Skip to main content
StatementSync.prototype.get - node__sqlite.d.ts - Node documentation
method StatementSync.prototype.get

Usage in Deno

```typescript import { StatementSync } from "node:node__sqlite.d.ts"; ```
StatementSync.prototype.get(...anonymousParameters: SupportedValueType[]): unknown
This method executes a prepared statement and returns the first result as an object. If the prepared statement does not return any results, this method returns `undefined`. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the values in `namedParameters` and `anonymousParameters`.

Parameters

...anonymousParameters: SupportedValueType[]

Return Type

unknown
An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no rows were returned from the database then this method returns `undefined`.
StatementSync.prototype.get(
namedParameters: Record<string, SupportedValueType>,
...anonymousParameters: SupportedValueType[],
): unknown

Parameters

namedParameters: Record<string, SupportedValueType>
...anonymousParameters: SupportedValueType[]

Return Type

unknown