跳到主要内容

useFindOneOrFail()

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

Defined in: rxdb-vue/src/hooks.ts:307

查找单个实体,找不到则抛错

Type Parameters​

Type Parameter
T extends EntityType

Parameters​

ParameterTypeDescription
EntityTypeT实体类
optionsUseOptions<EntityStaticType<T, "findOneOrFailOptions">>查询选项

Returns​

RxDBResource<InstanceType<T> | undefined>

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