跳到主要内容

useFindOne()

function useFindOne<T>(EntityType, options): RxDBResource<InstanceType<T> | undefined>;

Defined in: hooks.ts:183

查找匹配条件的单个实体

Type Parameters

Type Parameter
T extends EntityType

Parameters

ParameterTypeDescription
EntityTypeT实体类
optionsUseOptions<EntityStaticType<T, "findOneOptions">>查询选项(where 子句、排序等)

Returns

RxDBResource<InstanceType<T> | undefined>

包含实体的响应式资源对象