1
2
3
4
5
6
7
8
9
10
11
12
13
14
export const supaBaseQuery = async (
connectionString: string,
query: string,
args: any[] = [],
) => {
const { Client } = await import(
"https://deno.land/x/postgres@v0.17.0/mod.ts"
);
const client = new Client(connectionString);
await client.connect();
const result = await client.queryArray(query, args);
await client.end();
return result;
};