Skip to content

Commit eead49c

Browse files
committed
Connect: Harmonize sections to use "SSL connection" across the board
1 parent 35eb997 commit eead49c

File tree

10 files changed

+51
-31
lines changed

10 files changed

+51
-31
lines changed

docs/connect/elixir/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ result = Postgrex.query!(conn, "SELECT region, mountain, height FROM sys.summits
5252
IO.inspect(result)
5353
```
5454

55-
:::{rubric} CrateDB Cloud
55+
:::{rubric} SSL connection
5656
:::
5757

58-
For connecting to CrateDB Cloud, adjust the `ssl: true` parameter,
58+
Adjust the `ssl: true` parameter,
5959
and replace hostname, username, and password with values matching your
6060
environment.
61+
62+
Also use this variant to connect to CrateDB Cloud.
6163
```elixir
6264
options = [
6365
hostname: "testcluster.cratedb.net",

docs/connect/go/ksql.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,19 @@ func main() {
7474
}
7575
```
7676

77-
:::{rubric} CrateDB Cloud
77+
:::{rubric} SSL connection
7878
:::
7979

80-
For connecting to CrateDB Cloud, use `sslmode=require`, and
80+
Use `sslmode=require`, and
8181
replace username, password, and hostname with values matching
8282
your environment.
83+
84+
Also use this variant to connect to CrateDB Cloud.
8385
```go
8486
dbURL := "postgresql://admin:[email protected]:5432/?sslmode=require"
8587
```
8688

87-
:::{rubric} Quickstart example
89+
:::{rubric} Example
8890
:::
8991

9092
Create the file `example.go` including the synopsis code shared above.

docs/connect/go/pgx.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,14 @@ func main() {
6161
}
6262
```
6363

64-
:::{rubric} CrateDB Cloud
64+
:::{rubric} SSL connection
6565
:::
6666

67-
For connecting to CrateDB Cloud, use `sslmode=require`, and
67+
Use `sslmode=require`, and
6868
replace username, password, and hostname with values matching
6969
your environment.
70+
71+
Also use this variant to connect to CrateDB Cloud.
7072
```go
7173
conn, _ := pgx.Connect(ctx, "postgresql://admin:[email protected]:5432/?sslmode=require")
7274
```

docs/connect/go/pq.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,19 @@ func main() {
4141
}
4242
```
4343

44-
:::{rubric} CrateDB Cloud
44+
:::{rubric} SSL connection
4545
:::
4646

47-
For connecting to CrateDB Cloud, use `sslmode=require`, and
47+
Use `sslmode=require`, and
4848
replace username, password, and hostname with values matching
4949
your environment.
50+
51+
Also use this variant to connect to CrateDB Cloud.
5052
```go
5153
connStr := "postgresql://admin:[email protected]:5432/?sslmode=require"
5254
```
5355

54-
:::{rubric} Quickstart example
56+
:::{rubric} Example
5557
:::
5658

5759
Create the file `example.go` including the synopsis code shared above.

docs/connect/java/cratedb-jdbc.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,14 @@ void main() throws SQLException {
6161
}
6262
```
6363

64-
:::{rubric} CrateDB Cloud
64+
:::{rubric} SSL connection
6565
:::
6666

67-
For connecting to CrateDB Cloud, use the `sslmode=require` parameter,
67+
Use the `sslmode=require` parameter,
6868
and replace username, password, and hostname with values matching
6969
your environment.
70+
71+
Also use this variant to connect to CrateDB Cloud.
7072
```java
7173
properties.put("user", "admin");
7274
properties.put("password", "password");

docs/connect/java/postgresql-jdbc.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,14 @@ void main() throws SQLException {
6161
}
6262
```
6363

64-
:::{rubric} CrateDB Cloud
64+
:::{rubric} SSL connection
6565
:::
6666

67-
For connecting to CrateDB Cloud, use the `sslmode=require` parameter,
67+
Use the `sslmode=require` parameter,
6868
and replace username, password, and hostname with values matching
6969
your environment.
70+
71+
Also use this variant to connect to CrateDB Cloud.
7072
```java
7173
properties.put("user", "admin");
7274
properties.put("password", "password");

docs/connect/odbc/csharp.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@ using (OdbcConnection connection = new OdbcConnection(connection_string))
5656
}
5757
```
5858

59+
:::{rubric} SSL connection
60+
:::
61+
62+
Use the `Sslmode=require` parameter,
63+
and replace username, password, and hostname with values matching
64+
your environment.
65+
66+
Also use this variant to connect to CrateDB Cloud.
67+
```csharp
68+
string connection_string = "Driver={PostgreSQL Unicode};Server=testcluster.cratedb.net;Port=5432;Sslmode=require;Uid=admin;Pwd=password";
69+
```
70+
5971
:::{rubric} Example
6072
:::
6173

@@ -68,16 +80,6 @@ Invoke program.
6880
dotnet run
6981
```
7082

71-
:::{rubric} CrateDB Cloud
72-
:::
73-
74-
For connecting to CrateDB Cloud, use the `Sslmode=require` parameter,
75-
and replace username, password, and hostname with values matching
76-
your environment.
77-
```csharp
78-
string connection_string = "Driver={PostgreSQL Unicode};Server=testcluster.cratedb.net;Port=5432;Sslmode=require;Uid=admin;Pwd=password";
79-
```
80-
8183

8284
[.NET Framework Data Provider for ODBC]: https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/data-providers#net-framework-data-provider-for-odbc
8385
[System.Data.Odbc]: https://learn.microsoft.com/en-us/dotnet/api/system.data.odbc

docs/connect/odbc/python.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,16 @@ Invoke program.
121121
python example.py
122122
```
123123

124-
## CrateDB Cloud
124+
## SSL connection
125125

126-
For connecting to CrateDB Cloud, use the `Sslmode=require` parameter,
126+
Use the `Sslmode=require` parameter,
127127
and replace username, password, and hostname with values matching
128128
your environment.
129+
130+
Also use this variant to connect to CrateDB Cloud.
129131
```python
130132
connection_string = \
131-
"Driver={PostgreSQL Unicode};Server=testcluster.cratedb.net;Port=5432;" \
133+
"Driver={PostgreSQL Unicode};Server=testcluster.cratedb.net;Port=5432;Sslmode=require;" \
132134
"Uid=admin;Pwd=password;MaxVarcharSize=1073741824"
133135
```
134136

docs/connect/r/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ res <- dbGetQuery(conn, "SELECT * FROM sys.summits ORDER BY height DESC LIMIT 10
5252
print(res)
5353
```
5454

55-
:::{rubric} CrateDB Cloud
55+
:::{rubric} SSL connection
5656
:::
5757

58-
For connecting to CrateDB Cloud, use `sslmode = "require"`, and
58+
Use `sslmode = "require"`, and
5959
replace hostname, username, and password with values matching
6060
your environment.
61+
62+
Also use this variant to connect to CrateDB Cloud.
6163
```r
6264
conn <- dbConnect(RPostgres::Postgres(),
6365
host = "testcluster.cratedb.net",

docs/connect/rust/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@ cargo add postgres
5151
cargo run
5252
```
5353

54-
:::{rubric} Synopsis (CrateDB Cloud)
54+
:::{rubric} Synopsis (SSL connection)
5555
:::
56-
For CrateDB Cloud, add TLS support and update the connection string with
56+
Add TLS support and update the connection string with
5757
your cluster details.
5858

59+
Also use this variant to connect to CrateDB Cloud.
60+
5961
`src/main.rs`
6062
```rust
6163
use postgres::Client;

0 commit comments

Comments
 (0)