문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top