method BaseRepository.prototype.findById
Since 0.1.0
BaseRepository.prototype.findById(id: Id): Promise<Entity | null>

Fetch a single entity by its primary key.

Parameters

id: Id

Primary key value

Return Type

Promise<Entity | null>

The entity or null when not found

Usage

import { BaseRepository } from "database-plugin/src/index.ts";