$ open source · GPL-3.0 — need a commercial license? imqueue.com →

query.primaryKeys() function

Return names of primary key fields for a given model.

Signature:

export function primaryKeys(model: typeof BaseModel): string[];

Parameters

Parameter

Type

Description

model

typeof BaseModel

Model to read the keys of.

Returns:

string[]

The primary key attribute names, in declaration order.