🦆
Waddler
Unify your database communication in JS and TS
Andrew Sherman Andrew Sherman
Dan Kochetov Dan Kochetov
Alex Blokh Alex Blokh
by Drizzle.Team
Documentation
Waddler is a database client wrapper that unifies database communication and enables all* supported database clients to use an SQL template tag with consistent syntax, value escaping, helping prevent SQL injection and supporting common query-building scenarios.


* supported clients by waddler

You don't need to learn each driver's API, hunt for the features you need to build queries, or constantly write your own small utilities for parameterization, escaping, and so on. All of that is handled by the sql`` template tag from Waddler
SQL template
sql.identifier
sql.values
sql.raw
Types
Stream
Chunked
// Import from any driver subpackage to wrap it with waddler
import { waddler } from 'waddler/...';

const sql = waddler({ dbUrl: "" })

await sql`select * from "users" where "id" = ${10}`;
// Example wrapping "duckdb-neo" driver with waddler
import { waddler } from 'waddler/duckdb-neo';

const sql = waddler({ dbUrl: ":memory:" })

await sql`select * from "users" where "id" = ${10}`;
select * from "users" where "id" = $1;
-- 10 will be passed as a param [10]