Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/nessie/deps.ts>SQLiteClient#queryEntries

A modular Deno library for PostgreSQL, MySQL, MariaDB and SQLite migrations
Go to Latest
method SQLiteClient.prototype.queryEntries
import { SQLiteClient } from "https://deno.land/x/nessie@2.0.7/deps.ts";

Like query except each row is returned as an object containing key-value pairs.

Examples

const rows = db.queryEntries<{ name: string, age: number }>("SELECT name, age FROM people");
// rows = [{ name: "Peter Parker", age: 21 }, ...]

Type Parameters

optional
O extends RowObject = RowObject

Parameters

sql: string
optional
params: QueryParameterSet

Returns

Array<O>