resolvePullIneligibility()
function resolvePullIneligibility(
rxdb,
namespace,
entity,
syncType
): Promise<string | undefined>;
Defined in: packages/rxdb/src/sync-contract/sync-record-utils.ts:73
Internal
判定某个 repository 当前能否拉取(syncType + RxDBSync.enabled 两道)
Parameters
| Parameter | Type | Description |
|---|---|---|
rxdb | RxDB | RxDB 实例 |
namespace | string | 命名空间 |
entity | string | 实体名 |
syncType | RepositorySyncType | 已解析的同步类型 |
Returns
Promise<string | undefined>
不具备资格时返回可读原因,具备资格时返回 undefined
Remarks
syncType 先判、判负就直接返回,一条系统记录都不读:一个 none 仓库没有理由
为了「被拒绝」先开一次本地库。只有 syncType 这关过了,enabled 才有意义。