Module

x/kysely_postgrs_js_dialect/mod.ts>kysely.ColumnDefinitionBuilder#stored

Kysely dialect for PostgreSQL using the Postgres.js client.
Latest
method kysely.ColumnDefinitionBuilder.prototype.stored
import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.4/mod.ts";
const { ColumnDefinitionBuilder } = kysely;

Makes a generated column stored instead of virtual. This method can only be used with {@link generatedAlwaysAs}

Examples

db.schema
  .createTable('person')
  .addColumn('full_name', 'varchar(255)', (col) => col
    .generatedAlwaysAs("concat(first_name, ' ', last_name)")
    .stored()
  )
  .execute()