method IRepository.findOne
Since 0.2.0
IRepository.findOne(options?: FindOptions): Promise<Entity | null>

Fetch the first entity matching the optional filter.

Parameters

optional
options: FindOptions

Find options; at most one matching entity is returned

Return Type

Promise<Entity | null>

The first matching entity, or null when none matches

Usage

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