zlacker

[parent] [thread] 3 comments
1. themer+(OP)[view] [source] 2024-08-29 00:42:35
My big wish for SQL is for single row inserts to have a {key: value} syntax.
replies(3): >>nickpe+41 >>zX41Zd+f6 >>Boston+W6
2. nickpe+41[view] [source] 2024-08-29 00:50:27
>>themer+(OP)
This would condense lines of code by a lot and prevent a lot of dumb bugs.
3. zX41Zd+f6[view] [source] 2024-08-29 01:43:21
>>themer+(OP)
In ClickHouse you can do

    INSERT INTO table FORMAT JSONEachRow {"key": 123}
It works with all other formats as well.

Plus, it is designed in a way so you can make an INSERT query and stream the data, e.g.:

    clickhouse-client --query "INSERT INTO table FORMAT Protobuf" < data.protobuf

    curl 'https://example.com/?query=INSERT...' --data-binary @- < data.bson
4. Boston+W6[view] [source] 2024-08-29 01:53:27
>>themer+(OP)
MySQL has it without the braces.
[go to top]