RxDBBranchSwitchContext
Defined in: packages/rxdb/src/rxdb-plugin-system.ts:120
RxDBSystemContribution.prepareBranchSwitch 拿到的上下文
Properties
currentBranchId
readonly currentBranchId: string | null;
Defined in: packages/rxdb/src/rxdb-plugin-system.ts:131
当前分支 id;一条 active 分支都没有时为 null
executor
readonly executor: TransactionExecutor;
Defined in: packages/rxdb/src/rxdb-plugin-system.ts:128
切换事务本身的执行器
Remarks
这里读到的与写下的,跟接下来那次切换同生共死:抛出即整次回滚,不会留下半棵切过去的工作树。 能写并不意味着该写——见 RxDBSystemContribution.prepareBranchSwitch。
preconditions
readonly preconditions:
| RxDBBranchSwitchPreconditions
| undefined;
Defined in: packages/rxdb/src/rxdb-plugin-system.ts:137
调用方提出的前置条件;没提出时是 undefined,与空对象是同一件事
targetBranchId
readonly targetBranchId: string;
Defined in: packages/rxdb/src/rxdb-plugin-system.ts:134
要切过去的分支 id