Question

I have done preliminary studies on Crate. Now i would like to work on Objects, Arrays and Arrays within Object using crate. It seems very basic document was given on

https://crate.io/docs/current/sql/ddl.html#object.

I need advanced examples using objects, arrays Arrays within objects. I need to accomplish this using my php-client which is on development.

i found a note saying

in the python client a python list can be used as an argument to the cursors execute method.

I want to know more on this. Especially I would like to do this on php.

Was it helpful?

Solution

You have to use the args field in the JSON payload to specify nested values. The value in args is just a plain JSON array, so it should be straight forward to send them with your php client.

Details on the HTTP endpoint of crate, which you probably already use via PHP, can be found here https://crate.io/docs/current/sql/rest.html . There is also an example for argument passing.

greetings, bernd

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top