needsPull()
function needsPull(metadata, globalSync?): boolean;
Defined in: packages/rxdb/src/version/sync-type-utils.ts:155
检查 repository 是否需要 pull
Parameters
| Parameter | Type | Description |
|---|---|---|
metadata | EntityMetadata | 实体元数据 |
globalSync? | SyncOptions | 全局同步配置(可选) |
Returns
boolean
是否需要 pull
Example
needsPull(metadataFull); // true (full)
needsPull(metadataFilter); // true (filter)
needsPull(metadataRemote); // true (remote)
needsPull(metadataLocal); // false (local)
needsPull(metadataNone); // false (none)