Skip to content

Commit

Permalink
Connect: Use doc schema. Use code blocks for providing copy/paste btn.
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Nov 21, 2024
1 parent 1fb6dba commit a406876
Showing 1 changed file with 52 additions and 26 deletions.
78 changes: 52 additions & 26 deletions docs/connect/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ applications and drivers may obtain connection properties in different formats.
code span.pre {
font-size: smaller;
}

/* Code blocks need to be slimmer */
.driver-slim pre {
margin-top: 0;
padding: 0.4em;
}
.driver-slim p {
margin-bottom: 0;
}
</style>

::::::{tab-set}
Expand All @@ -51,9 +60,9 @@ code span.pre {

**Connection properties**

:Host: `<clustername>`.cratedb.net
:Host: `<cluster>`.cratedb.net
:Port: 5432 (PostgreSQL) or<br>4200 (HTTP)
:User: `<username>`
:User: `<user>`
:Pass: `<password>`

:::
Expand All @@ -62,24 +71,35 @@ code span.pre {
:columns: 8
:margin: 0
:padding: 0
:class: driver-slim

**Connection-string examples**
<br><br>

A native PostgreSQL connection string, e.g. for `psql`.
<br>
`postgresql://<username>:<password>@<clustername>.cratedb.net:5432/crate`
**Native PostgreSQL, use with psql**
```
postgresql://<user>:<password>@<cluster>.cratedb.net:5432/doc
```

A connection string for the CrateDB JDBC Driver, e.g. for Apache Flink.
<br>
`jdbc:crate://<username>:<password>@<clustername>.cratedb.net:5432/`
**JDBC: PostgreSQL pgJDBC**
```
jdbc:postgresql://<user>:<password>@<cluster>.cratedb.net:5432/doc
```

A connection string for SQLAlchemy.
<br>
`crate://<username>:<password>@<clustername>.cratedb.net:4200/?ssl=true`
**JDBC: CrateDB JDBC, use with Apache Flink**
```
jdbc:crate://<user>:<password>@<cluster>.cratedb.net:5432/doc
```

**HTTP, use with Admin UI, CLI, CrateDB drivers**
```
https://<user>:<password>@<cluster>.cratedb.net:4200/
```

An HTTP URL to visit Admin UI, or use with `crash`.
<br>
`https://<username>:<password>@<clustername>.cratedb.net:4200/`
**SQLAlchemy**
```
crate://<user>:<password>@<cluster>.cratedb.net:4200/?schema=doc&ssl=true
```

:::

Expand Down Expand Up @@ -111,24 +131,30 @@ An HTTP URL to visit Admin UI, or use with `crash`.
:columns: 8
:margin: 0
:padding: 0
:class: driver-slim

**Connection-string examples**
<br><br>

A native PostgreSQL connection string, e.g. for `psql`.
<br>
`postgresql://crate@localhost:5432/crate`
**Native PostgreSQL, use with psql**
```
postgresql://crate@localhost:5432/doc
```

A connection string for the CrateDB JDBC Driver, e.g. for Apache Flink.
<br>
`jdbc:crate://crate@localhost:5432/`
**JDBC: PostgreSQL pgJDBC**
```
jdbc:crate://crate@localhost:5432/doc
```

A connection string for SQLAlchemy.
<br>
`crate://crate@localhost:4200/`
**HTTP, use with Admin UI, CLI, CrateDB drivers**
```
http://crate@localhost:4200/
```

An HTTP URL to visit Admin UI, or use with `crash`.
<br>
`http://crate@localhost:4200/`
**SQLAlchemy**
```
crate://crate@localhost:4200/?schema=doc
```

:::

Expand Down

0 comments on commit a406876

Please sign in to comment.