import { DB } from "https://deno.land/x/sqlite@v3.8/mod.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 }, ...]
const rows = db.queryEntries<{ name: string, age: number }>(
"SELECT name, age FROM people WHERE age >= :minAge",
{ minAge },
);
// rows = [{ name: "Peter Parker", age: 21 }, ...]
Parameters
optional
params: QueryParameterSet