Comments (34)
@gpbmike I started hacking on this a while ago, unfortunately I just haven't had time to work on it. Hopefully I can add this feature in soon.
from emberfire.
@aputinski no worries, thanks for you work. 👍
from emberfire.
👍
from emberfire.
from emberfire.
from emberfire.
👍
from emberfire.
I think this is actually pretty straight forward and I have it working with the project I'm working on, except for one part that I could use some help on.
When a child is removed from the resulting Query, I don't know if it has been removed because another child was added and the removed child was pushed off the query, or if it was removed on the Firebase end and the query is now reflecting that. The difference would be if I want to update the store or not.
from emberfire.
Status? This is blocking my team from considering Firebase.
from emberfire.
@jayphelps this is my implementation with the aforementioned child_removed caveat: https://github.com/webhook/webhook-cms/blob/173ba55402eac39b07aa7873081f300e888337c5/app/adapters/application.js
from emberfire.
@jayphelps -- if you want to know if the data is still there, just attached a "value" callback to the specific location where the data lives, and if it's null you'll know the data has been deleted.
from emberfire.
@gpbmike Thanks very much for sharing your solution; I'm just starting with schema design and the availability of priorities will affect the implementation of a few things - even if limit() is problematic at the moment it's enough to get me off the ground.
If you are able to implement the limit fix as @jayphelps suggests, or have any other updates here please post back again!
from emberfire.
@aputinski did you have a solution to the child_removed
issue described above (also shown here)?
from emberfire.
Oh, just realised that @gpbmike code does not have support for priorities, and in fact this issue does not mention priorities in the title either so does not really replace issue #63 which was closed above.
By my thinking, priorities, startAt and endAt offer significant functionality as a feature set and will impact the way a database(/firebase) is structured to begin with, where as limit() as a tool for processing data in batches (mainly pagination - which is not so much of a priority as things that affect a project's initial data schema).
Does anyone have any information on how to go about setting priorities currently? Can this issue be updated to include priorities as well so that that requirement isn't lost?
Edit as per jayphelps's comment below
from emberfire.
@Zuur I think you mean @gpbmike? I haven't posted any code.
from emberfire.
Any news on this?
from emberfire.
+1
from emberfire.
+2
from emberfire.
@gpbmike could you help us implementing Priority support in your code?
It would help us a lot. Thanks.
I found this other solution, but haven't tried it yet: https://github.com/rlivsey/fireplace
from emberfire.
+3
from emberfire.
strange, this is quiet essential... any news??
from emberfire.
+4
from emberfire.
-1, not using firebase anymore. #meteor
from emberfire.
For those of you still waiting on official support, this is what I've been using for a while now.
https://github.com/webhook/webhook-cms/blob/master/app/adapters/application.js
Feedback welcome of course.
from emberfire.
@gpbmike we definitely want to add this. Thanks for putting something together. Firebase has added new querying functionality (see https://www.firebase.com/docs/web/guide/retrieving-data.html#section-queries), and we're going to be working on adding query support in the coming weeks.
from emberfire.
The adapter extension I posted above supports some of the new querying functionality.
- orderBy
- limitToFirst
- limitToLast
- startAt
- endAt
from emberfire.
The ability to query for specific data seems to be basic fundamental functionality of working with any database. In addition to the list above equalTo
is also crucial to use emberfire in a serious manner.
👍 +1
from emberfire.
@gpbmike thanks for your solution. I am able to query FB. I was also able to implement equalTo
by adding just a few lines; fairly easy. Thanks again.
from emberfire.
+1
from emberfire.
Waiting on this as well - hard to go beyond the hello world use case without proper query support
from emberfire.
@Emerson and others, check out #169
from emberfire.
I love the serverless pattern and Firebase Hosting is great but without the ability to really send queries I dont see how anyone could build anything substantial using EmberFire.
Let's assume I have an App that needs to do more that just Select by ID and Select All
How do you use this library if you cannot query Firebase?
Is there a way to pass native queries in via the data adapter?
Lets assume I have a user and I want to show all of his Posts but the Firebase repository has more than just his posts stored there. I cannot figure out how to pass in a query param (user = 5) to make that work in a normal way. There doesn't seem to be a way to Sideload either. One thing I can do is if the user has an array of Post Ids in their user model then I can iterate over them and make dozens of API calls into Firebase to get each post but that seems awful.
@katowulf thinks this is "not particularly challenging" but I cannot find any examples and I do not want invent the wheel. How do I 'drop to the Firebase API and use it directly' as I do not see examples, patterns or best practices.
In need of support / guidance / info.
Brendan
from emberfire.
@gpbmike This looks great! I'm curious what version of firebase you're using. I get the undefined is not a function
error whenever I try to call a querying method on ref
(so ref.limitToLast(n)
blows up).
from emberfire.
@dustinbrownman you need to be using version 2.
from emberfire.
landed in EmberFire 1.4.0+
from emberfire.
Related Issues (20)
- This seems to throw an error HOT 2
- Realtime: how to subscribe to multiple documents HOT 15
- Steps for local-setup lead to non-functional dummy app HOT 2
- Does emberfire v3 realtime database adapter work at all? HOT 7
- store.queryRecord broken with query-only HOT 2
- Type Error: firebase-app.ts HOT 2
- Realtime Updates not working HOT 8
- fastboot, ember simple auth and emberfire dont work each other HOT 2
- error querying firestore in fastboot mode HOT 1
- Firestore adapter reference options order
- Emberfire v3 bug in the firestore adapter
- Bug in firestore: Cannot read property 'replace' of undefined HOT 5
- Using `include` in findRecord throws error HOT 1
- subcollections implemented in a way that prevents multiple hasmany relationships with the same model
- FirestoreAdapter Error while processing route: index the adapter could not find the resource HOT 2
- Session.isAuthenticated is not getting updated? HOT 5
- adapter.fetch is not a function when using TORII for Auth in 3.0.0-rc6 HOT 1
- Potential Security Issue
- @jamesdaniels, please consider ember-adopted-addons program HOT 1
- For Anyone Struggling with hasMany relationships with Firestore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emberfire.