Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace --data-raw with -d #104

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/src/cn/operation/ceresmeta.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
```
curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/route' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"clusterName":"defaultCluster",
"schemaName":"public",
"table":["demo"]
Expand All @@ -23,7 +23,7 @@ curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/route' \
```
curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/getNodeShards' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"ClusterName":"defaultCluster"
}'
```
Expand All @@ -33,7 +33,7 @@ curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/getNodeShards
```
curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/getShardTables' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"clusterName":"defaultCluster",
"nodeName":"127.0.0.1:8831",
"shardIDs": [1,2]
Expand All @@ -45,7 +45,7 @@ curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/getShardTable
```
curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/dropTable' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"clusterName": "defaultCluster",
"schemaName": "public",
"table": "demo"
Expand All @@ -57,7 +57,7 @@ curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/dropTable' \
```
curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/transferLeader' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"clusterName":"defaultCluster",
"shardID": 1,
"oldLeaderNodeName": "127.0.0.1:8831",
Expand All @@ -70,7 +70,7 @@ curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/transferLeade
```
curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/split' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"clusterName" : "defaultCluster",
"schemaName" :"public",
"nodeName" :"127.0.0.1:8831",
Expand Down
10 changes: 5 additions & 5 deletions docs/src/cn/operation/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CeresDB 支持标准的 SQL,用户可以使用 Http 协议创建表和读写
```shell
curl --location --request POST 'http://127.0.0.1:5000/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"query": "CREATE TABLE `demo` (`name` string TAG, `value` double NOT NULL, `t` timestamp NOT NULL, TIMESTAMP KEY(t)) ENGINE=Analytic with (enable_ttl='\''false'\'')"
}'
```
Expand All @@ -21,7 +21,7 @@ curl --location --request POST 'http://127.0.0.1:5000/sql' \
```shell
curl --location --request POST 'http://127.0.0.1:5000/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"query": "INSERT INTO demo(t, name, value) VALUES(1651737067000, '\''ceresdb'\'', 100)"
}'
```
Expand All @@ -33,7 +33,7 @@ curl --location --request POST 'http://127.0.0.1:5000/sql' \
```shell
curl --location --request POST 'http://127.0.0.1:5000/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"query": "select * from demo"
}'
```
Expand All @@ -45,7 +45,7 @@ curl --location --request POST 'http://127.0.0.1:5000/sql' \
```shell
curl --location --request POST 'http://127.0.0.1:5000/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"query": "show create table demo"
}'
```
Expand All @@ -57,7 +57,7 @@ curl --location --request POST 'http://127.0.0.1:5000/sql' \
```shell
curl --location --request POST 'http://127.0.0.1:5000/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"query": "DROP TABLE demo"
}'
```
Expand Down
10 changes: 5 additions & 5 deletions docs/src/cn/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ docker run -d --name ceresdb-server \

```shell
curl --location --request POST 'http://127.0.0.1:5440/sql' \
--data-raw '
-d '
CREATE TABLE `demo` (
`name` string TAG,
`value` double NOT NULL,
Expand All @@ -66,7 +66,7 @@ ENGINE=Analytic

```shell
curl --location --request POST 'http://127.0.0.1:5440/sql' \
--data-raw '
-d '
INSERT INTO demo (t, name, value)
VALUES (1651737067000, "ceresdb", 100)
'
Expand All @@ -76,7 +76,7 @@ INSERT INTO demo (t, name, value)

```shell
curl --location --request POST 'http://127.0.0.1:5440/sql' \
--data-raw '
-d '
SELECT
*
FROM
Expand All @@ -88,7 +88,7 @@ FROM

```shell
curl --location --request POST 'http://127.0.0.1:5440/sql' \
--data-raw '
-d '
SHOW CREATE TABLE `demo`
'
```
Expand All @@ -97,7 +97,7 @@ SHOW CREATE TABLE `demo`

```shell
curl --location --request POST 'http://127.0.0.1:5440/sql' \
--data-raw '
-d '
DROP TABLE `demo`
'
```
Expand Down
12 changes: 6 additions & 6 deletions docs/src/en/operation/ceresmeta.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You need to replace {CeresMetaAddr} with the actual project path, if you are sta
```
curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/route' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"clusterName":"defaultCluster",
"schemaName":"public",
"table":["demo"]
Expand All @@ -23,7 +23,7 @@ curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/route' \
```
curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/getNodeShards' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"ClusterName":"defaultCluster"
}'
```
Expand All @@ -33,7 +33,7 @@ curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/getNodeShards
```
curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/getShardTables' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"clusterName":"defaultCluster",
"nodeName":"127.0.0.1:8831",
"shardIDs": [1,2]
Expand All @@ -45,7 +45,7 @@ curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/getShardTable
```
curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/dropTable' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"clusterName": "defaultCluster",
"schemaName": "public",
"table": "demo"
Expand All @@ -57,7 +57,7 @@ curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/dropTable' \
```
curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/transferLeader' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"clusterName":"defaultCluster",
"shardID": 1,
"oldLeaderNodeName": "127.0.0.1:8831",
Expand All @@ -70,7 +70,7 @@ curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/transferLeade
```
curl --location --request POST 'http://{CeresMetaAddr}:8080/api/v1/split' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"clusterName" : "defaultCluster",
"schemaName" :"public",
"nodeName" :"127.0.0.1:8831",
Expand Down
10 changes: 5 additions & 5 deletions docs/src/en/operation/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CeresDB supports standard SQL protocols and allows you to create tables and read
```shell
curl --location --request POST 'http://127.0.0.1:5000/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"query": "CREATE TABLE `demo` (`name` string TAG, `value` double NOT NULL, `t` timestamp NOT NULL, TIMESTAMP KEY(t)) ENGINE=Analytic with (enable_ttl='\''false'\'')"
}'
```
Expand All @@ -21,7 +21,7 @@ curl --location --request POST 'http://127.0.0.1:5000/sql' \
```shell
curl --location --request POST 'http://127.0.0.1:5000/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"query": "INSERT INTO demo(t, name, value) VALUES(1651737067000, '\''ceresdb'\'', 100)"
}'
```
Expand All @@ -33,7 +33,7 @@ curl --location --request POST 'http://127.0.0.1:5000/sql' \
```shell
curl --location --request POST 'http://127.0.0.1:5000/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"query": "select * from demo"
}'
```
Expand All @@ -45,7 +45,7 @@ curl --location --request POST 'http://127.0.0.1:5000/sql' \
```shell
curl --location --request POST 'http://127.0.0.1:5000/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"query": "show create table demo"
}'
```
Expand All @@ -57,7 +57,7 @@ curl --location --request POST 'http://127.0.0.1:5000/sql' \
```shell
curl --location --request POST 'http://127.0.0.1:5000/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
-d '{
"query": "DROP TABLE demo"
}'
```
Expand Down
10 changes: 5 additions & 5 deletions docs/src/en/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ docker run -d --name ceresdb-server \

```shell
curl --location --request POST 'http://127.0.0.1:5440/sql' \
--data-raw '
-d '
CREATE TABLE `demo` (
`name` string TAG,
`value` double NOT NULL,
Expand All @@ -66,7 +66,7 @@ ENGINE=Analytic

```shell
curl --location --request POST 'http://127.0.0.1:5440/sql' \
--data-raw '
-d '
INSERT INTO demo (t, name, value)
VALUES (1651737067000, "ceresdb", 100)
'
Expand All @@ -76,7 +76,7 @@ INSERT INTO demo (t, name, value)

```shell
curl --location --request POST 'http://127.0.0.1:5440/sql' \
--data-raw '
-d '
SELECT
*
FROM
Expand All @@ -88,7 +88,7 @@ FROM

```shell
curl --location --request POST 'http://127.0.0.1:5440/sql' \
--data-raw '
-d '
SHOW CREATE TABLE `demo`
'
```
Expand All @@ -97,7 +97,7 @@ SHOW CREATE TABLE `demo`

```shell
curl --location --request POST 'http://127.0.0.1:5440/sql' \
--data-raw '
-d '
DROP TABLE `demo`
'
```
Expand Down
Loading