We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using @vercel/postgres to create pool and pass a client to run function. Won't this be enough?
@vercel/postgres
run
import { createPool, VercelPool } from '@vercel/postgres'; let pool: VercelPool; export async function getPool() { if (!pool) { pool = createPool({ connectionString: DATABASE_URL }); } return await pool.connect(); } export async function runQuery<T>(query: SQLFragment<T>) { const client = await getPool(); const res = await query.run(client); client.release(); return res; }
It works without issues on Vercel
Vercel
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm using
@vercel/postgres
to create pool and pass a client torun
function. Won't this be enough?Steps to reproduce
Expected result
It works without issues on Vercel
Actual result
Environment
Vercel
Logs, links
The text was updated successfully, but these errors were encountered: