-
Notifications
You must be signed in to change notification settings - Fork 277
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
Extending queries by modifing TxPaginationMeta #1092
Conversation
shared_model/backend/protobuf/queries/impl/proto_tx_pagination_meta.cpp
Outdated
Show resolved
Hide resolved
shared_model/backend/protobuf/queries/impl/proto_tx_pagination_meta.cpp
Outdated
Show resolved
Hide resolved
shared_model/backend/protobuf/queries/impl/proto_tx_pagination_meta.cpp
Outdated
Show resolved
Hide resolved
shared_model/backend/protobuf/queries/proto_get_account_asset_transactions.hpp
Outdated
Show resolved
Hide resolved
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.
Global changes to correct:
- Please don't change whitecharacters of lines which You don't change
- Please don't remove/add newlines at the end of existing files
- Please don't add/remove newlines between lines which You don't change
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.
There are still changes in whitespaces/newline removing in files with not changed code. Please correct its (remove Your changes from the files). Also it would be good not to change parts of files not around changed code.
shared_model/backend/protobuf/queries/impl/proto_get_account_transactions.cpp
Outdated
Show resolved
Hide resolved
shared_model/backend/protobuf/queries/proto_get_account_transactions.hpp
Outdated
Show resolved
Hide resolved
shared_model/builders/protobuf/builder_templates/query_template.hpp
Outdated
Show resolved
Hide resolved
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.
Code is almost ready. Just few small corrections and adding the test I've mentioned in the review.
The next thing is to update documentation. Then please let me know.
If the next version would be good we can ask Iroha-Core-Team to take a look into the code.
shared_model/builders/protobuf/builder_templates/query_template.hpp
Outdated
Show resolved
Hide resolved
Please |
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.
Small changes, but rather IMO it looks good.
Now correct suggestions from iroha core team. Then change from Draft into normal PR. Then we can ask Iroha Core Team on chat for review.
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.
Code looks really good now. So I'm satisfied with the code, now it is time to satisfy Iroha Team:).
test/module/shared_model/validators/protobuf/proto_query_validator_test.cpp
Outdated
Show resolved
Hide resolved
Did you check this PR does not break existing API? |
@Pawlak00 can you please rebase your commits on the latest support/1.2.x? |
@kuvaldini I think it does not. Fields added queries.proto are optional and order is preserved |
Something happend during rebasing from: |
@Pawlak00 I think the easiest thing to remove redundant commits is just squash everything into a single commit. Otherwise there are no major issues |
@Pawlak00 ^^ If need help, You can reach me for help in telegram for instant messaging https://t.me/kuvaldini cc @baziorek |
I messed up with one test, so it is not ready to merge now, hope i will figure it out today |
Good luck.
It is very good test failed before merge, not after
…On July 28, 2021 at 6:25 PM Piotr Pawłowski ***@***.*** > wrote:
I messed up with one test, so it is not ready to merge now, hope i will figure it out today
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #1092 (comment) , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALJH3F673PPGPGD3MDWD6ZDT2AONPANCNFSM465WYISA .
|
Issue is solved, so it is ready to proceed @kuvaldini @baziorek |
…tAccountAssetsTransactions Signed-off-by: Piotr Pawlowski <[email protected]> validation improved, tests added Signed-off-by: Piotr Pawlowski <[email protected]> validation fixed Signed-off-by: Piotr Pawlowski <[email protected]> time validation fixed Signed-off-by: Piotr Pawlowski <[email protected]> const introduced Signed-off-by: Piotr Pawlowski <[email protected]> space fixed Signed-off-by: Piotr Pawlowski <[email protected]>
…tAccountAssetsTransactions (#1092) Signed-off-by: Piotr Pawlowski <[email protected]>
…tAccountAssetsTransactions (#1092) Signed-off-by: Piotr Pawlowski <[email protected]> Signed-off-by: Piotr Pawłowski <[email protected]>
…tAccountAssetsTransactions (#1092) Signed-off-by: Piotr Pawlowski <[email protected]>
…tAccountAssetsTransactions (#1092) Signed-off-by: Piotr Pawlowski <[email protected]> Signed-off-by: Piotr Pawłowski <[email protected]>
…tAccountAssetsTransactions (hyperledger-iroha#1092) Signed-off-by: Piotr Pawlowski <[email protected]> Signed-off-by: Piotr Pawłowski <[email protected]> Signed-off-by: G.Bazior <[email protected]>
Description of the Change
This is prove of concept for extending queries with time interval (from,to). Protobufs were modified and some basic logic was added. Validation of passed strings is not provided yet. Modified queries are getAccountTransactions and GetAccountAssetTransactions
Protobufs were modified, then neccesary getters were added.
Passed parameters are attached to sql query in executeTransactionsQuery, by applyer lamba function,
created separately in each function
Benefits
What benefits will be realized by the code change?
Allowing to query for Transactions in given time interval and beetwen two given block heights
Possible Drawbacks
What are the possible side-effects or negative impacts of the code change?
Usage of many if's in GetAccountTransactions/GetAccountAssetTransactions in postgres_specific_query_executor.cpp
Usage Examples or Tests [optional]
By rebuilding python library with protbuffs from code you can use it in Python library
Alternate Designs [optional]
Usage of different types for passing data as timestamp was considered, but I decided to use string, as it is not needed to cast from int to string