Melon-dbMelon-db
API reference@melon-db/db-query

byId

@melon-db/db-query — byId

@melon-db/db-query API Reference


Function: byId()

byId<RecordShape>(collection, id, primaryKey?): QueryAst

Defined in: utilities.ts:6

Builds a query AST that finds a record by primary key.

Type Parameters

Type ParameterDefault type
RecordShapeRecord<string, unknown>

Parameters

ParameterType
collectionstring
idstring | number
primaryKeykeyof RecordShape & string

Returns

QueryAst