CommitOptions
Defined in: packages/rxdb-plugin-working-tree/src/working-tree/commit-command.ts:56
一次 commit() 的入参(contracts/core-api.md §4)。
Remarks
authorId 与 operationId 都是必填。 作者可选的话,一条历史里会同时存在
有作者与无作者的 commit,而后者在多设备场景里永远说不清是谁提交的;操作 id 可选的话,
幂等键只能由内容合成,于是「同样内容的两次提交」会被判成同一次(见
commit/commit-idempotency.ts)。
没有 selection 入参——这是 v1 硬裁决 1,不是签名未完成(FR-041)。
Extends
Properties
authorId
readonly authorId: string;
Defined in: packages/rxdb-plugin-working-tree/src/working-tree/commit-command.ts:58
提交作者;落进不可变历史的 Commit.author
expectedBranch
readonly expectedBranch: ActiveBranchToken;
Defined in: packages/rxdb-plugin-working-tree/src/working-tree/commit-conflict.ts:80
捕获时的 active 分支身份
Inherited from
WorkingTreeCredentials.expectedBranch
expectedHeadRevision
readonly expectedHeadRevision: number;
Defined in: packages/rxdb-plugin-working-tree/src/working-tree/commit-conflict.ts:83
捕获时的 HEAD 推进 revision
Inherited from
WorkingTreeCredentials.expectedHeadRevision
expectedWorkingTreeRevision
readonly expectedWorkingTreeRevision: number;
Defined in: packages/rxdb-plugin-working-tree/src/working-tree/commit-conflict.ts:86
捕获时的工作树 revision
Inherited from
WorkingTreeCredentials.expectedWorkingTreeRevision
operationId
readonly operationId: string;
Defined in: packages/rxdb-plugin-working-tree/src/working-tree/commit-command.ts:61
调用方的操作 id;同一次逻辑提交的重试必须带同一个值