-
Notifications
You must be signed in to change notification settings - Fork 51
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
✨ add order_by
and descending
options to scan and fetch_all queries
#291
Conversation
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
f8bddd4
to
d338cc0
Compare
Signed-off-by: ff137 <[email protected]>
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 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
fe5c8a9
to
bd11dfe
Compare
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
@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: openwallet-foundation/acapy#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 <[email protected]>
Signed-off-by: ff137 <[email protected]>
* ✨ add `order_by` and `descending` options to query / scan and fetch_all methods Signed-off-by: ff137 <[email protected]> * ✨ add `order_by` and `descending` options to PaginatedQuerySchema Signed-off-by: ff137 <[email protected]> * ✨ modify `get_limit_offset` to `get_paginated_query_params` Signed-off-by: ff137 <[email protected]> * ✨ add ordering to InMemoryStorage scan and fetch_all methods Signed-off-by: ff137 <[email protected]> * 🚧 test in-progress aries-askar PR: openwallet-foundation/askar#291 Signed-off-by: ff137 <[email protected]> * ⬆️ Update lock file Signed-off-by: ff137 <[email protected]> * 🎨 fix ruff warning Signed-off-by: ff137 <[email protected]> * ✅ fix assertions Signed-off-by: ff137 <[email protected]> * 🚧 test aries-askar with TestPyPI package Signed-off-by: ff137 <[email protected]> * 🚧 test latest askar testpypi package Signed-off-by: ff137 <[email protected]> * 🎨 Update order_by description and default value. Include in schema Signed-off-by: ff137 <[email protected]> * ⬆️ Update aries-askar test pypi package to pre-orjson feat release Signed-off-by: ff137 <[email protected]> --------- Signed-off-by: ff137 <[email protected]>
* ✨ add `order_by` and `descending` options to query / scan and fetch_all methods Signed-off-by: ff137 <[email protected]> * ✨ add `order_by` and `descending` options to PaginatedQuerySchema Signed-off-by: ff137 <[email protected]> * ✨ modify `get_limit_offset` to `get_paginated_query_params` Signed-off-by: ff137 <[email protected]> * ✨ add ordering to InMemoryStorage scan and fetch_all methods Signed-off-by: ff137 <[email protected]> * 🚧 test in-progress aries-askar PR: openwallet-foundation/askar#291 Signed-off-by: ff137 <[email protected]> * ⬆️ Update lock file Signed-off-by: ff137 <[email protected]> * 🎨 fix ruff warning Signed-off-by: ff137 <[email protected]> * ✅ fix assertions Signed-off-by: ff137 <[email protected]> * 🚧 test aries-askar with TestPyPI package Signed-off-by: ff137 <[email protected]> * 🚧 test latest askar testpypi package Signed-off-by: ff137 <[email protected]> * 🎨 Update order_by description and default value. Include in schema Signed-off-by: ff137 <[email protected]> * ⬆️ Update aries-askar test pypi package to pre-orjson feat release Signed-off-by: ff137 <[email protected]> --------- Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
* ✨ add `order_by` and `descending` options to query / scan and fetch_all methods Signed-off-by: ff137 <[email protected]> * ✨ add `order_by` and `descending` options to PaginatedQuerySchema Signed-off-by: ff137 <[email protected]> * ✨ modify `get_limit_offset` to `get_paginated_query_params` Signed-off-by: ff137 <[email protected]> * ✨ add ordering to InMemoryStorage scan and fetch_all methods Signed-off-by: ff137 <[email protected]> * 🚧 test in-progress aries-askar PR: openwallet-foundation/askar#291 Signed-off-by: ff137 <[email protected]> * ⬆️ Update lock file Signed-off-by: ff137 <[email protected]> * 🎨 fix ruff warning Signed-off-by: ff137 <[email protected]> * ✅ fix assertions Signed-off-by: ff137 <[email protected]> * 🚧 test aries-askar with TestPyPI package Signed-off-by: ff137 <[email protected]> * 🚧 test latest askar testpypi package Signed-off-by: ff137 <[email protected]> * 🎨 Update order_by description and default value. Include in schema Signed-off-by: ff137 <[email protected]> * 🐛 fix deserialisation of descending: bool parameter Signed-off-by: ff137 <[email protected]> * ⏪ revert to testing 0.3.3b0 askar test package Signed-off-by: ff137 <[email protected]> * 🔥 remove unnecessary record sorts (now that askar sorts by id == sorting by created_at) Signed-off-by: ff137 <[email protected]> * ✅ fix test assertions -- wallet_list and connections_list no longer does additional sorting Signed-off-by: ff137 <[email protected]> * ⬆️ Update lock file Signed-off-by: ff137 <[email protected]> --------- Signed-off-by: ff137 <[email protected]>
* ✨ add `order_by` and `descending` options to query / scan and fetch_all methods Signed-off-by: ff137 <[email protected]> * ✨ add `order_by` and `descending` options to PaginatedQuerySchema Signed-off-by: ff137 <[email protected]> * ✨ modify `get_limit_offset` to `get_paginated_query_params` Signed-off-by: ff137 <[email protected]> * ✨ add ordering to InMemoryStorage scan and fetch_all methods Signed-off-by: ff137 <[email protected]> * 🚧 test in-progress aries-askar PR: openwallet-foundation/askar#291 Signed-off-by: ff137 <[email protected]> * ⬆️ Update lock file Signed-off-by: ff137 <[email protected]> * 🎨 fix ruff warning Signed-off-by: ff137 <[email protected]> * ✅ fix assertions Signed-off-by: ff137 <[email protected]> * 🚧 test aries-askar with TestPyPI package Signed-off-by: ff137 <[email protected]> * 🚧 test latest askar testpypi package Signed-off-by: ff137 <[email protected]> * 🎨 Update order_by description and default value. Include in schema Signed-off-by: ff137 <[email protected]> * 🐛 fix deserialisation of descending: bool parameter Signed-off-by: ff137 <[email protected]> * ⏪ revert to testing 0.3.3b0 askar test package Signed-off-by: ff137 <[email protected]> * 🔥 remove unnecessary record sorts (now that askar sorts by id == sorting by created_at) Signed-off-by: ff137 <[email protected]> * ✅ fix test assertions -- wallet_list and connections_list no longer does additional sorting Signed-off-by: ff137 <[email protected]> * ⬆️ Update lock file Signed-off-by: ff137 <[email protected]> --------- Signed-off-by: ff137 <[email protected]>
* ✨ add `order_by` and `descending` options to query / scan and fetch_all methods Signed-off-by: ff137 <[email protected]> * ✨ add `order_by` and `descending` options to PaginatedQuerySchema Signed-off-by: ff137 <[email protected]> * ✨ modify `get_limit_offset` to `get_paginated_query_params` Signed-off-by: ff137 <[email protected]> * ✨ add ordering to InMemoryStorage scan and fetch_all methods Signed-off-by: ff137 <[email protected]> * 🚧 test in-progress aries-askar PR: openwallet-foundation/askar#291 Signed-off-by: ff137 <[email protected]> * ⬆️ Update lock file Signed-off-by: ff137 <[email protected]> * 🎨 fix ruff warning Signed-off-by: ff137 <[email protected]> * ✅ fix assertions Signed-off-by: ff137 <[email protected]> * 🚧 test aries-askar with TestPyPI package Signed-off-by: ff137 <[email protected]> * 🚧 test latest askar testpypi package Signed-off-by: ff137 <[email protected]> * 🎨 Update order_by description and default value. Include in schema Signed-off-by: ff137 <[email protected]> * 🐛 fix deserialisation of descending: bool parameter Signed-off-by: ff137 <[email protected]> * ⏪ revert to testing 0.3.3b0 askar test package Signed-off-by: ff137 <[email protected]> * 🔥 remove unnecessary record sorts (now that askar sorts by id == sorting by created_at) Signed-off-by: ff137 <[email protected]> * ✅ fix test assertions -- wallet_list and connections_list no longer does additional sorting Signed-off-by: ff137 <[email protected]> * ⬆️ Update lock file Signed-off-by: ff137 <[email protected]> --------- Signed-off-by: ff137 <[email protected]>
Closes #290
Adds ordering functionality to
scan
andfetch_all
queries, to allow for custom ordering of fetched storage records.