Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Feat: traces in QueryToken #114
Conversation
|
我这几天看一下,给出代码层面的反馈 |
|
LGTM |
580ef67
to
3d1ec55
|
@Saviio 我上面将 这样之后发版时,将这里的 commits cherry-pick 到老版本 rdb 上就可以了。维护一份修改好追踪一些 :) |
ea5a3ed
to
5f45087
| const op: Op = isEqual ? { type: OpType.Reuse, index: prevIndex } : { type: OpType.New, index: k } | ||
|
|
||
| if (prevIndex === k && isEqual) { | ||
| reused++ |
...并调整 QueryToken 里的 lastEmit 字段初始值,避免使用不易与实际推出 结果区分的 `[]`,使用 undefined;traces 接口在遇到 lastEmit 尚未设值的 情况时,返回意为全新结果集的 TraceResult。
| @@ -174,7 +174,7 @@ export function diff<T>(oldList: T[], newList: T[], pk = '_id'): Ops { | |||
| } | |||
| } | |||
|
|
|||
| const arrayIsSame = reused === curr.length && prev.length === curr.length | |||
| const arrayIsSame = reused === curr.length && prev.length === curr.length && reused !== 0 | |||
This reverts commit 45de6bf.
...满足 Observable 订阅类似于函数调用,二次调用不应该出现与一次调用不 同的情况,否则行为难以预知。将 trace 的概念从 lastEmit 中区分开来,作 为 QueryToken 级的变量,而不受订阅影响。
|
LGTM |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

No description provided.