跳到主要内容

getEntityObjectFromResult()

function getEntityObjectFromResult<T>(
metadata,
columns,
rows,
opts?): Promise<T>;

Defined in: packages/rxdb-adapter-sqlite-core/src/sqlite-core.utils.ts:525

从查询结果行创建实体对象

Type Parameters

Type ParameterDefault type
T extends objectEntityData

Parameters

ParameterTypeDescription
metadataEntityMetadata实体元数据
columnsstring[]列名数组
rowsSQLiteCompatibleType[]行数据数组
opts?EncryptionContext-

Returns

Promise<T>

实体对象,键为 JS 属性名