Better Tables
Packages

@better-tables/adapters-toolkit

ORM-agnostic primitives for writing custom Better Tables adapters.

bun add @better-tables/adapters-toolkit
npm install @better-tables/adapters-toolkit
pnpm add @better-tables/adapters-toolkit

Shared, ORM-agnostic primitives for building adapters: filter-operator routing (FilterRouter / PredicateEmitter), flat-to-nested data transformation (DataTransformer), primary-table resolution (PrimaryTableResolver), relationship-path aliasing, schema-introspection ports, and safe SQL identifier escaping.

Use it when implementing a new adapter (Prisma, Kysely, raw SQL, …) instead of forking the Drizzle adapter — @better-tables/adapters-drizzle itself composes these primitives.

Full walkthrough of the contract and every export: Custom adapters.