import { pgClient } from "https://deno.land/x/windmill@v1.52.0/pg.ts";
deno-postgres client API is very flexible: https://deno.land/x/postgres@v0.17.0/mod.ts?s=QueryClient
Examples
// Static query
// Static query
const { rows } = await pgClient(db).queryObject(
"SELECT ID, NAME FROM CLIENTS"
);
// Prepared Statements
const { rows } = await pgClient(db).queryObject`SELECT ID, NAME FROM CLIENTS WHERE ID = ${id}`;
Parameters
db: Resource<"postgresql">
the PostgreSQL resource to generate the client for