Appearance
@enumeratio/client
The TypeScript read-through client over the pure-SQL core. Construct a collection, then enumerate, count, rank/unrank, project statistics, render representations, follow maps, and value-address elements — all lazily, against an in-browser (or node) PGlite.
ts
import { provideDb, makeDb, construct } from '@enumeratio/client'
provideDb(() => makeDb())
const p = construct('permutations', { size: 4 })
await p.card() // 24
await p.serialize(0, 3) // ['1234', '1243', '1324']
await p.serialize(0, 3, { repr: 'cycle' }) // cycle notation
await p.window(0, 3, { stats: ['inversions'], maps: ['cycle_type'] })
await p.at('@2413') // value-address by serialization
await p.glyphSvg(0) // the element's page-space SVG, emitted by the db (null if none)The CLI, the explorer, and the components (client-backed web elements) are thin drivers over this client.