Open ashwinswy opened 6 years ago
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
You need an additional level of lists, so bindingvals type must be: list<list<list
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 startdev.sh
, but it is not working for me probably because of some missing dependencies. Are these dependencies documented? Am I even looking at the correct file?
Further to that, can you please tell me how to build actordb?
I tried doing make but got the following error
cat: /etc/redhat-release: No such file or directory
Makefile:168: warning: overriding recipe for target `ballclean'
Makefile:65: warning: ignoring old recipe for target `ballclean'
./rebar get-deps
=ERROR REPORT==== 30-Oct-2018::11:35:46 ===
beam/beam_load.c(1365): Error loading module rebar:
use of opcode 153; this emulator supports only up to 152
=ERROR REPORT==== 30-Oct-2018::11:35:46 ===
Loading of /home/ftpcmbin/workspace/actordb/actordb/rebar/rebar/ebin/rebar.beam failed: badfile
escript: exception error: undefined function rebar:main/1
in function escript:run/2
in call from escript:start/1
in call from init:start_it/1
in call from init:start_em/1
make: *** [deps] Error 127
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?