Repository navigation
feat(database): adds auditTime for queries - #776
Merged
Merged
Conversation
RxJS merge takes a variable number of observables - not an array - so apply should be called instead of call. Fixed the related test, too.
Not sure why this was commented out, as it's implemented and testable. It's now tested in a manner similar to the other tests.
Using the export syntax, Rollup generates an empty bundle.
Adds an auditTime(0) operator to the composed query observable so that changes made to multiple subjects are emitted as a single query (emitted in the event loop) rather than as separate queries (emitted immediately). Closes angular#389 and angular#770.
Collaborator
|
@cartant Thank you so much! Let me give this a review and I'll get back to you soon! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
npm install,npm run build, andnpm testrun successfully? yesDescription
This PR adds an
auditTime(0)operator to the composed query observable. That means the query is not emitted immediately, but is emitted in the event loop - so if there are changes made to multiple subjects, those changes don't result in the emission of multiple queries. See this comment.I've made the auditing optional (it defaults to
true) so that theobserveQuerytests could remain synchronous and simple. The other tests now use auditing. And I've added some specific audit tests, too.Also, this PR fixes a bug in which
callwas used instead ofapplywhen composing themergeoperator. Said operator takes a variable number of observables not an array, soapplyshould be used. (This also cleans up the calling function's result type - which was weird because the use ofcallsometimes saw observables emitted.)The PR also changes
test-root.tstoimportrather thanexport, as I was unable to get Rollup to build a non-empty test bundle - even when using only the dependencies installed with AngularFire2.