UNPKG

agnostic-query

Version:

Type-safe fluent builder for portable query schemas. Runtime-agnostic, database-agnostic — the same QuerySchema drives Drizzle, Kysely, db0, or raw SQL.

10 lines (8 loc) 258 B
import type { FieldPathByShape, SchemaShape } from './schema.ts'; export type QueryOrderBy< TShape extends SchemaShape = SchemaShape, TField extends FieldPathByShape<TShape> = FieldPathByShape<TShape>, > = { field: TField; direction: 'asc' | 'desc'; };