-
Notifications
You must be signed in to change notification settings - Fork 25
Conversation
Current coverage is 100% (diff: 100%)@@ master #73 diff @@
====================================
Files 15 16 +1
Lines 1096 1114 +18
Methods 6 6
Messages 0 0
Branches 185 191 +6
====================================
+ Hits 1096 1114 +18
Misses 0 0
Partials 0 0
|
if (update.afterAll.length) { | ||
target.add(update.afterAll); | ||
} | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else
should be on new line.
if (updates.length) { | ||
target.put(updates); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
random line break
trackableQueryStore.add(createData()); | ||
trackableQueryStore.put(createUpdates()[0]); | ||
|
||
setTimeout(dfd.callback(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use dojo-core/timing#delay
for these scenarios and return the promise instead of using the dfd.callback
import * as registerSuite from 'intern!object'; | ||
import * as assert from 'intern/chai!assert'; | ||
import * as sinon from 'sinon'; | ||
import {createData, ItemType, createUpdates} from '../support/createData'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing white space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again just a really minor formatting nit pick that can be fix later.
Type: feature
Description:
Provides a simple API for materializing
QueryTransformResult
s. This builds on the work in #67 so that will need to be merged first. Without anapply
function materialize willadd()
alladds
,put()
allupdates
, anddelete()
alldeletes
received in theStoreDelta
s from the observedQueryTransformResult
. It will also add all data in theafterAll
property of the initial update.It returns a
Handle
that can be destroyed to prevent further updates.Specifying an
apply
function allows the application of updates to be customized.A lot of the concerns brought up in the original issue would be handled by the developer in the provided
apply
function.Conflict resolution is one of the targeted uses of the
StoreObservable
interface, so when that is implemented, using a target store that supports it would potentially be part of the solution there.Related Issue: #21
Please review this checklist before submitting your PR: