Skip to main content
Module

x/windmill/pg.ts

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
File
import { Client } from "https://deno.land/x/postgres@v0.16.1/mod.ts"import { type Resource, type Sql } from "./mod.ts"
export async function pgQuery( db: Resource<"postgresql">, query: Sql) { db.database = db.dbname db.hostname = db.host
const returned_query = await new Client(db).queryObject(query)
return returned_query.rows}