-
Notifications
You must be signed in to change notification settings - Fork 207
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
Initial invokeBindingList implementation #1068
Conversation
5f783aa
to
338f286
Compare
2d2bd1b
to
33dc23f
Compare
After some weekend fun.. all test seems to be working :) |
@artursouza @cicoyle please review :) |
Interesting.. when testing this code with the Spring Boot integration I found that the PostgreSQL binding for some reason doesn't return an array of JSON objects.. but an array of arrays $). I am totally confused by that now:
This PR works based on the assumption that the return will be an array of objects serialized in JSON, but that is not the behavior of the postgresql.binding |
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
eb2a94b
to
9b838d8
Compare
Ok, I've updated this PR to include a test where I show how invokeBindingList saves the user to deserialize objects. Unfortunately, due the nature of output bindings, this works with PostgreSQL for now. If we are planning to standardize a bit more the "query" command for output bindings, we can make it work with other providers. |
@artursouza @cicoyle please review :) |
@salaboy I am wondering if
In order to deserialize into a
Please give it a try and let me know if it works for your particular use case. As far as I can tell |
@artur-ciocanu thanks for checking this, I was trying to answer that same question, but I came to the conclusion that we need this. Mostly because if not you need to then deserialize the content of the objects manually like it is being shown in this test: public void invokeBindingResponseListObjectTypeRefTest() . The idea here is to simplify the users life by providing a helper method that will expect a list. This is specifically for "query" commands like the one provided by the PostgreSQL Binding that has a "row" style return type. |
I will close this PR, because this is not needed right now. We can get back to this if we find enough use cases to require this. |
Description
Add support for InvokeBindingList to enable binding returning a collection of typed objects.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #1067
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: