Waddler <> Prisma Postgres

This guide assumes familiarity with:
  • Database connection basics with Waddler
  • Prisma Postgres serverless database - website
  • Prisma Postgres direct connections - docs
  • Waddler PostgreSQL drivers - docs

Prisma Postgres is a serverless database built on unikernels. It has a large free tier, operation-based pricing and no cold starts.

You can connect to it using either the node-postgres or postgres.js drivers for PostgreSQL.

Prisma Postgres also has a serverless driver that will be supported with Waddler in the future.

Step 1 - Install packages

node-postgres (pg)
postgres.js
npm
yarn
pnpm
bun
npm i waddler pg

Step 2 - Initialize the driver and make a query

node-postgres (pg)
postgres.js
// Make sure to install the 'pg' package 
import { waddler } from "waddler/node-postgres";
import { Pool } from "pg";

const pool = new Pool({
  connectionString: process.env.DATABASE_URL,
});
const sql = waddler({ client: pool });
 
const result = await sql`select 1;`;