Execute Query and return results ( postgresql)
One script reply has been approved by the moderators Verified

Created by rossmccrann 184 days ago Viewed 1212 times 5 Points

Executes an arbitrary query and return the row results

No comments yet

Login to be able to comment
Points: 0
deno
One script reply has been approved by the moderators
Ap­pro­ved
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);
}

Submitted by rossmccrann 184 days ago

Edited 171 days ago

  • 0
    comment
    by adam186 23 days ago
Login to be able to comment