跳到主要内容

useFind()

function useFind<T>(EntityType, options): RxDBResource<InstanceType<T>[]>;

Defined in: hooks.ts:203

Find multiple entities matching the criteria

Type Parameters

Type Parameter
T extends EntityType

Parameters

ParameterTypeDescription
EntityTypeTThe entity class
optionsUseOptions<EntityStaticType<T, "findOptions">>Query options

Returns

RxDBResource<InstanceType<T>[]>

A resource object containing an array of entities

Example

const { value: users } = useFind(User, { where: { age: { $gt: 18 } } });