FindAllOptions<T, U, W>
Defined in: packages/rxdb/src/repository/query-options.interface.ts:113
FindAll 查询选项
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends EntityType | EntityType |
U | RuleGroup<InstanceType<T>> |
W extends string | string |
Properties
orderBy?
optional orderBy: OrderBy<W>[];
Defined in: packages/rxdb/src/repository/query-options.interface.ts:144
排序条件
Example
orderBy: [
\{ field: 'createdAt', sort: 'desc' \},
\{ field: 'id', sort: 'asc' \} // 必须包含唯一值排序
]
***
<a id="where"></a>
### where
```ts
where: U;
Defined in: packages/rxdb/src/repository/query-options.interface.ts:133
查询条件 用于过滤查询结果 支持组合查询
Example
where: {
combinator: 'and',
rules: [
{ field: 'status', operator: '=', value: 'active' },
{ field: 'createdAt', operator: '>=', value: '2023-01-01' }
]
}