-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python SDK and Android SDK have different start_at filtering methods #502
Comments
I found a few problems with this issue:
|
I'm not sure if the underlying REST API supports that style of queries: https://firebase.google.com/docs/database/rest/retrieve-data @yuchenshi do you know? |
Note that the given Query works exactly as explained in Android SDK, and I hope for Python SDK to make it work as also |
I tried to reverse engineer the code and stumbled upon the spec params that each SDK sends to decide how to filter the data. Python spec: It seems like both SDKs use the same pattern, where What seems to do the trick is the "sn" parameter, which is missing in Python SDK |
@hiranya911 I don't work on RTDB any more, but I've got some help from @puf who figured it out: Basically you can pass the starting node in In Python code, that is: |
Yep seems to be working just fine. I monkey patched it in any case someone has the same issue as me.
|
@ETsagkaris Would you consider opening a PR against this repository with your patch? That would help more folks in need and you may be able to remove the monkey-patch in the long run. |
I am using Firebase for a project of mine. In Android I can do a query like this:
mDatabase.child(dbRoot).child("Order").orderByChild("user_id").startAt(user.getUid(), "the order id to start from").endAt(user.getUid()).limitToFirst(15)
In "Order" object, I keep all orders made from all users. The Query gives a user's orders with pagination (it brings them in groups of 15). The problem is that in Python SDK the start_at function doesn't support the second input of starting node, and there is no way to make a similar query as far as I can tell
The text was updated successfully, but these errors were encountered: