property D1EntityMapping.primaryKey

The primary-key column(s). A scalar name keeps today's single-column behaviour; an array enables a composite key whose columns are matched in declaration order. Defaults to ['id'].

Type

string | readonly string[]

Usage

import { type D1EntityMapping } from "cloudflare-plugin/src/index.ts";