hi
is it possble to put some create queries to one http query.
just like:
curl localhost:9308/sql -d “mode=raw&query=CREATE TABLE product(title text, product_codes int);CREATE TABLE product(title text, product_codes int)”
or
curl localhost:9308/cli_json -d CREATE TABLE product(title text, product_codes int);CREATE TABLE product(title text, product_codes int)”
It’s possible for selects and SHOW META
, but not for arbitrary queries like create table
.
➜ ~ curl -s "http://localhost:9312/sql?mode=raw" -d 'query=select%20%2A%20from%20t%3Bselect%20%2A%20from%20t%3Bshow%20meta'|jq .
[
{
"columns": [
{
"id": {
"type": "long long"
}
}
],
"data": [],
"total": 0,
"error": "",
"warning": ""
},
{
"columns": [
{
"id": {
"type": "long long"
}
}
],
"data": [],
"total": 0,
"error": "",
"warning": ""
},
{
"columns": [
{
"Variable_name": {
"type": "string"
}
},
{
"Value": {
"type": "string"
}
}
],
"data": [
{
"Variable_name": "total",
"Value": "0"
},
{
"Variable_name": "total_found",
"Value": "0"
},
{
"Variable_name": "total_relation",
"Value": "eq"
},
{
"Variable_name": "time",
"Value": "0.000"
},
{
"Variable_name": "multiplier",
"Value": "2"
}
],
"total": 5,
"error": "",
"warning": ""
}
]