Skip to main content
Go to Latest
method PreparedQuery.prototype.firstEntry
import { PreparedQuery } from "https://deno.land/x/sqlite@v3.7.2/mod.ts";

Like first except the row is returned as an object containing key-value pairs.

Example

const query = db.prepareQuery<[number, string], { id: number, name: string }>("SELECT id, name FROM people");
const person = query.firstEntry();
// person = { id: 1, name: "Peter" }

Parameters

optional
params: P

Returns

O | undefined