method IDataSource.create
IDataSource.create(data: Partial<Record<string, unknown>>): Promise<Record<string, unknown>>

Insert a new entity.

Parameters

data: Partial<Record<string, unknown>>

The column values to insert

Return Type

Promise<Record<string, unknown>>

The persisted row, including any generated columns. On a deferred-write transaction the row is the one that will be written, and a generated column is therefore not yet known.

Usage

import { type IDataSource } from "common/src/index.ts";