From 728947a31d479e8336fdf5787e9eaec2b8a696b3 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Fri, 22 Nov 2024 00:58:43 +0100 Subject: [PATCH] Connect: Use `doc` schema. Use code blocks for providing copy/paste mech --- docs/connect/index.md | 85 ++++++++++++++++++++++++++++++------------- 1 file changed, 59 insertions(+), 26 deletions(-) diff --git a/docs/connect/index.md b/docs/connect/index.md index 0ee3419..44c7736 100644 --- a/docs/connect/index.md +++ b/docs/connect/index.md @@ -34,6 +34,17 @@ applications and drivers may obtain connection properties in different formats. code span.pre { font-size: smaller; } + +/* Code blocks need to be slimmer */ +.driver-slim div.highlight-default { + margin-top: 0.2em; +} +.driver-slim pre { + padding: 0.4em; +} +.driver-slim p { + margin-bottom: 0; +} ::::::{tab-set} @@ -51,9 +62,9 @@ code span.pre { **Connection properties** -:Host: ``.cratedb.net +:Host: ``.cratedb.net :Port: 5432 (PostgreSQL) or
4200 (HTTP) -:User: `` +:User: `` :Pass: `` ::: @@ -62,24 +73,35 @@ code span.pre { :columns: 8 :margin: 0 :padding: 0 +:class: driver-slim **Connection-string examples** +

-A native PostgreSQL connection string, e.g. for `psql`. -
-`postgresql://:@.cratedb.net:5432/crate` +**Native PostgreSQL, psql** +``` +postgresql://:@.cratedb.net:5432/doc +``` -A connection string for the CrateDB JDBC Driver, e.g. for Apache Flink. -
-`jdbc:crate://:@.cratedb.net:5432/` +**JDBC: PostgreSQL pgJDBC** +``` +jdbc:postgresql://:@.cratedb.net:5432/doc +``` + +**JDBC: CrateDB JDBC, e.g. Apache Flink** +``` +jdbc:crate://:@.cratedb.net:5432/doc +``` -A connection string for SQLAlchemy. -
-`crate://:@.cratedb.net:4200/?ssl=true` +**HTTP: Admin UI, CLI, CrateDB drivers** +``` +https://:@.cratedb.net:4200/ +``` -An HTTP URL to visit Admin UI, or use with `crash`. -
-`https://:@.cratedb.net:4200/` +**SQLAlchemy** +``` +crate://:@.cratedb.net:4200/?schema=doc&ssl=true +``` ::: @@ -111,24 +133,35 @@ An HTTP URL to visit Admin UI, or use with `crash`. :columns: 8 :margin: 0 :padding: 0 +:class: driver-slim **Connection-string examples** +

-A native PostgreSQL connection string, e.g. for `psql`. -
-`postgresql://crate@localhost:5432/crate` +**Native PostgreSQL, psql** +``` +postgresql://crate@localhost:5432/doc +``` -A connection string for the CrateDB JDBC Driver, e.g. for Apache Flink. -
-`jdbc:crate://crate@localhost:5432/` +**JDBC: PostgreSQL pgJDBC** +``` +jdbc:crate://crate@localhost:5432/doc +``` -A connection string for SQLAlchemy. -
-`crate://crate@localhost:4200/` +**JDBC: CrateDB JDBC, e.g. Apache Flink** +``` +jdbc:crate://:@localhost:5432/doc +``` + +**HTTP: Admin UI, CLI, CrateDB drivers** +``` +http://crate@localhost:4200/ +``` -An HTTP URL to visit Admin UI, or use with `crash`. -
-`http://crate@localhost:4200/` +**SQLAlchemy** +``` +crate://crate@localhost:4200/?schema=doc +``` :::