Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/kysely_postgrs_js_dialect/deps.ts>kysely.CreateTableBuilder#addPrimaryKeyConstraint

Kysely dialect for PostgreSQL using the Postgres.js client.
Latest
method kysely.CreateTableBuilder.prototype.addPrimaryKeyConstraint
Re-export
import { kysely } from "https://deno.land/x/kysely_postgrs_js_dialect@v0.27.4/deps.ts";
const { CreateTableBuilder } = kysely;

Adds a primary key constraint for one or more columns.

The constraint name can be anything you want, but it must be unique across the whole database.

Examples

addPrimaryKeyConstraint('primary_key', ['first_name', 'last_name'])

Parameters

constraintName: string
columns: C[]