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
How to send multiple parameterised queries through the thrift interface? #70
Comments
You can not with parameterized queries unfortunately. You can if it’s all in the sql statement. |
I'd like to try and add this functionality here. Can you point me in the right direction so that I can setup a development environment? Do you have some kind of wiki/documentation which will give me a top level view of all the components involved and how they are working together? |
By writing the thrift spec: https://github.com/biokoda/actordb/blob/master/adbt.thrift Implementing the call to actordb: https://github.com/biokoda/actordb_thrift/blob/master/src/adbt.erl The adbt.erl file wraps parameters in a list with a single parameter (prepare/1 function) because it assumes only one statement. It sends bindingvals as a list three layers deep, but first layer is always single element. This is what you need to expand. |
How can I setup a development environment? I can see that you have a bash script Further to that, can you please tell me how to build actordb? I tried doing make but got the following error
|
|
I've extended the thrift interface to support one more level of nesting for BindingVals0. Now the problem is that, when I'm executing multiple queries it is only returning the result of the very last query in Result(rdRes, wrRes). I'm assuming I need to modify the Result struct so that it returns a list of ReadResult & WriteResult structs in response. If so, how do you suggest I go about that? |
I've raised pull requests for this feature in the following repos: actordb, actordb_thrift, and adbt Please review these when you get a chance. Further to that, can you please let me know how to build actordb for production on CentOS? |
Thank you. Building a package is basically as simple as make package Requirements:
|
Keep in mind it will checkout according to tags and branches set for the various subprojects in rebar.config. Main actordb references actordb_core, which then references the other projects that were updated. If you have a fork of everything, you have to commit your own rebar.configs pointing to your forks. |
I couldn't find this anywhere in the documentation. I've tried the following:
In both cases, I'm getting
InvalidRequestException(info='not an error', code=6)
.First off, is this even possible? If not, how can I execute multiple queries within a transaction?
The text was updated successfully, but these errors were encountered: