Adapters
Adapters
How Better Tables talks to databases and HTTP backends.
Adapters implement the core contract: describe schema, fetch filtered/sorted/paginated rows, facets, and optional writes.
Drizzle
First-party ORM adapter for Postgres, MySQL, and SQLite.
HTTP
Browser-safe client + Next.js route handler for server-only adapters.
Custom
Implement the TableAdapter contract with the ORM-agnostic toolkit.
import { betterTables } from '@better-tables/core';
import { drizzleAdapter } from '@better-tables/adapters-drizzle';
export const tables = betterTables({
database: drizzleAdapter(db),
});For building a custom ORM adapter, start from the Custom adapters guide and @better-tables/adapters-toolkit.