createWorkingTreeCapturePort()
function createWorkingTreeCapturePort(
executor,
host,
token,
key
): WorkingTreeCapturePort;
Defined in: packages/rxdb-plugin-working-tree/src/working-tree/capture-runtime.ts:500
把一个事务执行器包成单个身份的 WorkingTreeCapturePort
Parameters
| Parameter | Type | Description |
|---|---|---|
executor | TransactionExecutor | 业务写所在的那个事务 |
host | WorkingTreeCaptureHost | 造实例用的实体管理器宿主 |
token | ActiveBranchToken | 本次写持有的 active 分支令牌 |
key | WorkingTreeEntryKey | 本次捕获的实体身份 |
Returns
端口实例
Remarks
「只有一条变更的批」:语义与 createWorkingTreeCaptureBatch 完全一致,区别只在
bumpWorkingTreeRevision() 自己收尾——单端口的调用方手上没有批对象,也就没有地方调
WorkingTreeCaptureBatch.flush,攒着不写的话这一次递增永远落不了库。