Skip to main content
Module

x/kysely_deno_postgres_dialect/deps.ts>kysely.Generated

Kysely dialect for PostgreSQL using the deno-postgres client.
Latest
type alias kysely.Generated
import { type kysely } from "https://deno.land/x/kysely_deno_postgres_dialect@v0.27.1/deps.ts";
const { Generated } = kysely;

A shortcut for defining database-generated columns. The type is the same for all selects, inserts and updates but the column is optional for inserts and updates.

The implementation:

// The update type is `S` instead of `S | undefined` because
// updates are always optional --> no need to specify optionality.
type Generated<S> = ColumnType<S, S | undefined, S>
definition: ColumnType<S, S | undefined, S>