Created by rossmccrann 184 days ago Viewed 1212 times 5 Points
Executes an arbitrary query and return the row results
No comments yet
import { pgQuery } from "https://deno.land/x/windmill@v1.31.0/pg.ts";
import type { Resource, Sql } from "https://deno.land/x/windmill@v1.31.0/mod.ts";
export async function main(
db: Resource<"postgresql">,
query: Sql = "select * from demo",
) {
return await pgQuery(db, query);
}