Skip to main content
Module

x/typeorm/src/index.ts>Repository#findOne

Forked from https://github.com/typeorm/typeorm
Latest
method Repository.prototype.findOne
Re-export
import { Repository } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";

Finds first entity that matches given options.

Parameters

optional
id:
| string
| number
| Date
| ObjectID
optional
options: FindOneOptions<Entity>

Returns

Promise<Entity | undefined>

Finds first entity that matches given options.

Parameters

optional
options: FindOneOptions<Entity>

Returns

Promise<Entity | undefined>

Finds first entity that matches given conditions.

Parameters

optional
conditions: FindConditions<Entity>
optional
options: FindOneOptions<Entity>

Returns

Promise<Entity | undefined>