Waddler
Modern SQL client
Install / Use
/learn @drizzle-team/WaddlerREADME
Waddler 🦆
<a href="https://waddler.drizzle.team">Website</a> • <a href="https://waddler.drizzle.team/docs/overview">Documentation</a> • <a href="https://x.com/drizzleorm">Twitter</a> • by Drizzle Team
Waddler - is a thin SQL client wrapper with modern API inspired by postgresjs and based on ES6 Tagged Template Strings.
You don't need to learn an api for db clients; just use the
sqltemplate tag for everything
Waddler is our vision of a modern, all-in-one client for any database dialect. It doesn't perform any specific mappings to or from a database, doesn't handle complex query building, and doesn't parse queries. Waddler simply unifies communication with your database using any client you choose - whether it's a simple TCP connection or an HTTP-based DB client.
We support all the dialects and drivers that Drizzle supports
You can check a full list of clients you can use - here
import { waddler } from "waddler/node-postgres";
import { waddler } from "waddler/mysql2";
import { waddler } from "waddler/libsql";
const sql = waddler({ dbUrl: process.env.DB_URL });
const sql = waddler();
// promisified SQL template API
const result = await sql`select * from users`;
// Easy to use values param
const values = sql.values([["Dan", "dan@acme.com", 25]]);
await sql`insert into "users" ("name", "email", "age") values ${values}`;
// insert into "users" ("name", "email", "age") values ('Dan', 'dan@acme.com', 25);
// no SQL injections
await sql`select * from users where id = ${10}`; // <-- converts to $1 and [10] params
// waddler supports types
await sql<{ id: number, name: string }>`select * from users`;
// streaming and chunking
const stream = sql`select * from users`.stream();
for await (const row of stream) {
console.log(row);
}
const chunked = sql`select * from users`.chunked(2);
for await (const chunk of chunked) {
console.log(chunk);
}
You can enable logger with all the metadata coming from drivers
import { Logger } from 'waddler';
import { waddler } from 'waddler/...'; // driver specific
class MyLogger implements Logger {
logQuery(query: string, params: unknown[], metadata?: any): void {
// metadata will contain all the extra fields coming from the specific db driver
console.log({ query, params, metadata });
}
}
const db = waddler({ logger: new MyLogger() });
For more information you can check the docs
Related Skills
oracle
338.0kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
prose
338.0kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
Writing Hookify Rules
83.4kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Command Development
83.4kThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
