-
Notifications
You must be signed in to change notification settings - Fork 49
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
✨ add order_by
and descending
options to scan and fetch_all queries
#291
Conversation
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
f8bddd4
to
d338cc0
Compare
Signed-off-by: ff137 <ff137@proton.me>
d338cc0
to
cf5787e
Compare
Ready for review! I wanted to test compatibility with ACA-Py, but building and installing the python wrapper from my local branch, and running pytest in ACA-Py, gives me:
This resolves when I revert to installing official pypi package with I tried adding If anyone can assist or direct me on how to set this up for local testing with ACA-Py, will be much appreciated! |
A logical extension would be to add the custom ordering option to "fetch all" queries as well (in a future PR) |
Good news! Managed to successfully test the changes locally 🚀 Happy to confirm that all the ACA-Py tests pass using this branch's changes ✅ |
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
I think I'm gonna try add the ordering options for fetching all records -- not just for scanning. |
order_by
and descending
options to scan and fetch_all queries
Signed-off-by: ff137 <ff137@proton.me>
I've expanded ordering options to the I can confirm python wrapper works with changes (ACA-Py tests pass using this build). JavaScript wrapper still has some tests that remain to be fixed ... |
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
fe5c8a9
to
bd11dfe
Compare
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
@andrewwhitehead Please let me know if you've had moment to review, if there are any additional steps necessary here. Maybe changing default behavior, or implementing some specific tests. ACA-Py tests are passing with these changes here: hyperledger/aries-cloudagent-python#3173 And our end-to-end tests, asserting unique results across pages, are passing now (as described here: |
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.
Thanks, I think it looks good!
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
* ✨ add `order_by` and `descending` options to query / scan and fetch_all methods Signed-off-by: ff137 <ff137@proton.me> * ✨ add `order_by` and `descending` options to PaginatedQuerySchema Signed-off-by: ff137 <ff137@proton.me> * ✨ modify `get_limit_offset` to `get_paginated_query_params` Signed-off-by: ff137 <ff137@proton.me> * ✨ add ordering to InMemoryStorage scan and fetch_all methods Signed-off-by: ff137 <ff137@proton.me> * 🚧 test in-progress aries-askar PR: hyperledger/aries-askar#291 Signed-off-by: ff137 <ff137@proton.me> * ⬆️ Update lock file Signed-off-by: ff137 <ff137@proton.me> * 🎨 fix ruff warning Signed-off-by: ff137 <ff137@proton.me> * ✅ fix assertions Signed-off-by: ff137 <ff137@proton.me> * 🚧 test aries-askar with TestPyPI package Signed-off-by: ff137 <ff137@proton.me> * 🚧 test latest askar testpypi package Signed-off-by: ff137 <ff137@proton.me> * 🎨 Update order_by description and default value. Include in schema Signed-off-by: ff137 <ff137@proton.me> * ⬆️ Update aries-askar test pypi package to pre-orjson feat release Signed-off-by: ff137 <ff137@proton.me> --------- Signed-off-by: ff137 <ff137@proton.me>
* ✨ add `order_by` and `descending` options to query / scan and fetch_all methods Signed-off-by: ff137 <ff137@proton.me> * ✨ add `order_by` and `descending` options to PaginatedQuerySchema Signed-off-by: ff137 <ff137@proton.me> * ✨ modify `get_limit_offset` to `get_paginated_query_params` Signed-off-by: ff137 <ff137@proton.me> * ✨ add ordering to InMemoryStorage scan and fetch_all methods Signed-off-by: ff137 <ff137@proton.me> * 🚧 test in-progress aries-askar PR: hyperledger/aries-askar#291 Signed-off-by: ff137 <ff137@proton.me> * ⬆️ Update lock file Signed-off-by: ff137 <ff137@proton.me> * 🎨 fix ruff warning Signed-off-by: ff137 <ff137@proton.me> * ✅ fix assertions Signed-off-by: ff137 <ff137@proton.me> * 🚧 test aries-askar with TestPyPI package Signed-off-by: ff137 <ff137@proton.me> * 🚧 test latest askar testpypi package Signed-off-by: ff137 <ff137@proton.me> * 🎨 Update order_by description and default value. Include in schema Signed-off-by: ff137 <ff137@proton.me> * ⬆️ Update aries-askar test pypi package to pre-orjson feat release Signed-off-by: ff137 <ff137@proton.me> --------- Signed-off-by: ff137 <ff137@proton.me>
Closes #290
Adds ordering functionality to
scan
andfetch_all
queries, to allow for custom ordering of fetched storage records.