Skip to content
app.ts
await querier.findMany(User, {
$select: { id: true, name: true },
$where: { email: { $endsWith: '@uql-orm.dev' } },
$limit: 10,
});

UQL

The perfectionist TypeScript ORM. Serializable queries, no codegen, and a unified API across Postgres, CockroachDB, MySQL, SQLite, MongoDB, and the edge.
Terminal window
npm install uql-orm

Most ORMs make you choose: lean and fast, or full-featured and heavy. UQL is designed so you don’t have to. A UQL query is a plain JSON object, the same data you can log, cache, send over HTTP, or hand to the browser, with full TypeScript inference at every depth. That one decision makes it both the fastest ORM in our benchmark and the most capable, with no codegen and no build step. It shapes everything else:

graph LR
    S["Server code"] --> Q["Type-safe JSON query"]
    C["Any HTTP client"] -. "HTTP" .-> Q
    Q --> P["QuerierPool"]
    P -- "dialect SQL / commands" --> DB[("SQL · MongoDB")]
    DB -- "typed result" --> P
  • Queries are data, not method chains. Build them dynamically, store them, diff them, or send them straight from the browser, mobile or micro-service. There’s no DSL to learn and nothing to compile.
  • One API everywhere. The same syntax runs on PostgreSQL, CockroachDB, MySQL, MariaDB, SQLite, LibSQL, Neon, Cloudflare D1, MongoDB, and Bun’s native SQL.
  • No codegen, no build step. Entities are TypeScript classes, so your code is the schema. There’s no .prisma file to regenerate and no generated client to keep in sync.
  • The fastest SQL generator! in all the 8 categories of our open-source benchmark, even vs. query builders as Knex and Kysely: ~2.1× faster on average than the runner-up, reaching over 3.9M ops/s on simple SELECTs.
  • The hard things, built in. Native semantic and vector search, non-bypassable multi-tenant security filters, soft-delete with restore, and entity-first migrations: capabilities that mean raw SQL, a plugin, or “not supported” in other ORMs. And when you want them, an optional REST API and typed browser client ship in the same package, no extra dependency.

Open source · Used in production by Variability.ai.