This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 441
Rework webApi queries #1111
Open
KkevinLi
wants to merge
18
commits into
EddyVerbruggen:master
Choose a base branch
from
KkevinLi:dev-rework-webapi-query
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rework webApi queries #1111
Conversation
This file contains 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
KkevinLi
force-pushed
the
dev-rework-webapi-query
branch
2 times, most recently
from
March 5, 2019 19:17
d17d725
to
6890621
Compare
… Android implementation
… iOS implementation
…compatible with webapi
…sions of Nativescript
…instead of a promise - Also remove ref from datasnapshot until we translate it into a web ref instead of native ref.
KkevinLi
force-pushed
the
dev-rework-webapi-query
branch
from
March 7, 2019 20:08
31179aa
to
414197f
Compare
I've updated the code so that it more strictly follows the Firebase Web API (To test you can copy paste examples from https://firebase.google.com/docs/database/admin/retrieve-data) Breaking Change:
Branch also includes:
|
Any update on this PR? Is there something I need to change before this gets pulled in? |
Oh man.. ehm.. probably not, but I'm struggling to find time to review it. |
3 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR refactors the webapi query code which allows us to chain filters + pass in eventTypes.
Before we were only able to do
firebaseWebApi.database().ref(path).orderByKey().on("value", onValueEvent")
but now we can dofirebaseWebApi.database().ref(path).orderByKey().equalTo("value).on("child_added", onValueEvent)
The api calls are backwards compatible, but now calling
on()
will not fire your callback for every event change at that path. Beforeon()
listens to value and child changes whereas now it listens only for the given eventType.