interface D1EntityMapping
Since 0.2.0

How one entity name maps onto a physical D1 table.

Properties

readonly
optional
table: string

The table name. Defaults to the entity name itself, so getRepository('users') needs no mapping at all.

readonly
optional
primaryKey: string | readonly string[]

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'].

Usage

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