Module

x/kysely_postgrs_js_dialect/deps.ts>kysely.AnyColumn

Kysely dialect for PostgreSQL using the Postgres.js client.
type alias kysely.AnyColumn
import { type kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.3/deps.ts";
const { AnyColumn } = kysely;

Given a database type and a union of table names in that db, returns a union type with all possible column names.

Example:

interface Person {
  id: number
}

interface Pet {
  name: string
  species: 'cat' | 'dog'
}

interface Movie {
  stars: number
}

interface Database {
  person: Person
  pet: Pet
  movie: Movie
}

type Columns = AnyColumn<Database, 'person' | 'pet'>

// Columns == 'id' | 'name' | 'species'

Type Parameters

DB
TB extends keyof DB
definition: [T in TB]: keyof DB[T][TB] & string
import kysely.AnyColumn
import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.3/deps.ts";
const { AnyColumn } = kysely;