Type-safe ORM for TypeScript

Meet PawQL

A runtime-first ORM that infers database types from your schema. Build with a clean query API, without code generation or a separate build step.

$npm install pawql
A typed query, from schema to result
import { connect } from "pawql";

const db = await connect({
  users: {
    id: { type: Number, primaryKey: true },
    name: String,
    isActive: { type: Boolean, default: true },
  },
}, process.env.DATABASE_URL!);

const users = await db.query("users")
  .where({ isActive: true })
  .select("id", "name")
  .execute();

Runtime-first schema

Define tables with plain JavaScript objects. No schema language or generated client to maintain.

Type-safe queries

Get TypeScript inference from your schema through selects, filters, joins, and mutations.

Your database, your runtime

Use PostgreSQL, MySQL or MariaDB, and SQLite with Node.js or Bun.

Read the PawQL overview or browse the complete documentation.