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

[connect/cli]: Improve wording and variable/template explanations #50

Merged
merged 2 commits into from
Sep 12, 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
23 changes: 13 additions & 10 deletions docs/connect/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ You can use them to quickly validate HTTP and PostgreSQL connectivity to your
database cluster, or to conduct basic scripting.

Before running the command-line snippets outlined below, please use the correct
settings instead of the placeholder tokens `<username>`, `<password>`, and
`<clustername>`.
settings instead of the placeholder tokens `<hostname>`, `<username>` and
`<password>`.

When using CrateDB Cloud, `<hostname>` will be something like
`<clustername>.{aks1,eks1}.region.{azure,aws}.cratedb.net`.


(crash)=
Expand All @@ -31,12 +34,12 @@ working with CrateDB. For more information, see the documentation about [crash].

::::{tab-set}

:::{tab-item} CrateDB Server and Cloud
:::{tab-item} CrateDB and CrateDB Cloud
:sync: server

```{code-block} shell
CRATEPW=<password> \
crash --hosts 'https://<clustername>.cratedb.net:4200' --username '<username>' \
crash --hosts 'https://<hostname>:4200' --username '<username>' \
--command "SELECT 42.42;"
```
:::
Expand Down Expand Up @@ -72,12 +75,12 @@ For more information, see the documentation about [psql].

::::{tab-set}

:::{tab-item} CrateDB Server and Cloud
:::{tab-item} CrateDB and CrateDB Cloud
:sync: server

```{code-block} shell
PGUSER=<username> PGPASSWORD=<password> \
psql postgresql://<clustername>.cratedb.net/crate --command "SELECT 42.42;"
psql postgresql://<hostname>/crate --command "SELECT 42.42;"
```
:::

Expand Down Expand Up @@ -111,11 +114,11 @@ For more information, see the documentation about [HTTPie].

::::{tab-set}

:::{tab-item} CrateDB Server and Cloud
:::{tab-item} CrateDB and CrateDB Cloud
:sync: server

```{code-block} shell
http https://<username>:<password>@<clustername>.cratedb.net:4200/_sql?pretty" \
http https://<username>:<password>@<hostname>:4200/_sql?pretty" \
stmt="SELECT 42.42;"
```
:::
Expand Down Expand Up @@ -151,12 +154,12 @@ This example combines it with [jq], a lightweight and flexible command-line JSON

::::{tab-set}

:::{tab-item} CrateDB Server and Cloud
:::{tab-item} CrateDB and CrateDB Cloud
:sync: server

```{code-block} shell
echo '{"stmt": "SELECT 42.42;"}' \
| curl "https://<username>:<password>@<clustername>.cratedb.net:4200/_sql?pretty" --silent --data @- | jq
| curl "https://<username>:<password>@<hostname>:4200/_sql?pretty" --silent --data @- | jq
```
:::

Expand Down
2 changes: 1 addition & 1 deletion docs/connect/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ needs to be configured with corresponding settings.

::::::{tab-set}

:::::{tab-item} CrateDB Server and Cloud
:::::{tab-item} CrateDB and CrateDB Cloud

::::{grid}
:margin: 0
Expand Down