Skip to content

Commit a401b2c

Browse files
authored
DOC-370 Fix SQL tagging and style issues (#87)
1 parent 89d0956 commit a401b2c

File tree

9 files changed

+56
-88
lines changed

9 files changed

+56
-88
lines changed

modules/components/pages/caches/sql.adoc

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ Common::
2323
--
2424
2525
```yml
26-
# Common config fields, showing default values
26+
# Common configuration fields, showing default values
2727
label: ""
2828
sql:
2929
driver: "" # No default (required)
30-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60 # No default (required)
30+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60" # No default (required)
3131
table: foo # No default (required)
3232
key_column: foo # No default (required)
3333
value_column: bar # No default (required)
@@ -40,11 +40,11 @@ Advanced::
4040
--
4141
4242
```yml
43-
# All config fields, showing default values
43+
# All configuration fields, showing default values
4444
label: ""
4545
sql:
4646
driver: "" # No default (required)
47-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60 # No default (required)
47+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60" # No default (required)
4848
table: foo # No default (required)
4949
key_column: foo # No default (required)
5050
value_column: bar # No default (required)
@@ -123,20 +123,15 @@ The following is a list of supported drivers, their placeholder style, and their
123123

124124
include::components:partial$drivers_table.adoc[]
125125

126-
Please note that the `postgres` driver enforces SSL by default, you can override this with the parameter `sslmode=disable` if required.
127-
128-
The `snowflake` driver supports multiple DSN formats. Please consult https://pkg.go.dev/github.com/snowflakedb/gosnowflake#hdr-Connection_String[the docs^] for more details. For https://docs.snowflake.com/en/user-guide/key-pair-auth.html#configuring-key-pair-authentication[key pair authentication^], the DSN has the following format: `<snowflake_user>@<snowflake_account>/<db_name>/<schema_name>?warehouse=<warehouse>&role=<role>&authenticator=snowflake_jwt&privateKey=<base64_url_encoded_private_key>`, where the value for the `privateKey` parameter can be constructed from an unencrypted RSA private key file `rsa_key.p8` using `openssl enc -d -base64 -in rsa_key.p8 | basenc --base64url -w0` (you can use `gbasenc` insted of `basenc` on OSX if you install `coreutils` via Homebrew). If you have a password-encrypted private key, you can decrypt it using `openssl pkcs8 -in rsa_key_encrypted.p8 -out rsa_key.p8`. Also, make sure fields such as the username are URL-encoded.
129-
130-
The https://pkg.go.dev/github.com/microsoft/gocosmos[`gocosmos`^] driver is still experimental, but it has support for https://learn.microsoft.com/en-us/azure/cosmos-db/hierarchical-partition-keys[hierarchical partition keys^] as well as https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-query-container#cross-partition-query[cross-partition queries^]. Please refer to the https://github.com/microsoft/gocosmos/blob/main/SQL.md[SQL notes^] for details.
131-
126+
include::components:partial$drivers_note.adoc[]
132127

133128
*Type*: `string`
134129

135130

136131
```yml
137132
# Examples
138133

139-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60
134+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60"
140135

141136
dsn: foouser:foopassword@tcp(localhost:3306)/foodb
142137

modules/components/pages/inputs/sql_raw.adoc

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Common::
2323
--
2424
2525
```yml
26-
# Common config fields, showing default values
26+
# Common configuration fields, showing default values
2727
input:
2828
label: ""
2929
sql_raw:
3030
driver: "" # No default (required)
31-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60 # No default (required)
31+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60" # No default (required)
3232
query: SELECT * FROM footable WHERE user_id = $1; # No default (required)
3333
args_mapping: root = [ this.cat.meow, this.doc.woofs[0] ] # No default (optional)
3434
auto_replay_nacks: true
@@ -40,12 +40,12 @@ Advanced::
4040
--
4141
4242
```yml
43-
# All config fields, showing default values
43+
# All configuration fields, showing default values
4444
input:
4545
label: ""
4646
sql_raw:
4747
driver: "" # No default (required)
48-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60 # No default (required)
48+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60" # No default (required)
4949
query: SELECT * FROM footable WHERE user_id = $1; # No default (required)
5050
args_mapping: root = [ this.cat.meow, this.doc.woofs[0] ] # No default (optional)
5151
auto_replay_nacks: true
@@ -128,20 +128,15 @@ The following is a list of supported drivers, their placeholder style, and their
128128

129129
include::components:partial$drivers_table.adoc[]
130130

131-
Please note that the `postgres` driver enforces SSL by default, you can override this with the parameter `sslmode=disable` if required.
132-
133-
The `snowflake` driver supports multiple DSN formats. Please consult https://pkg.go.dev/github.com/snowflakedb/gosnowflake#hdr-Connection_String[the docs^] for more details. For https://docs.snowflake.com/en/user-guide/key-pair-auth.html#configuring-key-pair-authentication[key pair authentication^], the DSN has the following format: `<snowflake_user>@<snowflake_account>/<db_name>/<schema_name>?warehouse=<warehouse>&role=<role>&authenticator=snowflake_jwt&privateKey=<base64_url_encoded_private_key>`, where the value for the `privateKey` parameter can be constructed from an unencrypted RSA private key file `rsa_key.p8` using `openssl enc -d -base64 -in rsa_key.p8 | basenc --base64url -w0` (you can use `gbasenc` insted of `basenc` on OSX if you install `coreutils` via Homebrew). If you have a password-encrypted private key, you can decrypt it using `openssl pkcs8 -in rsa_key_encrypted.p8 -out rsa_key.p8`. Also, make sure fields such as the username are URL-encoded.
134-
135-
The https://pkg.go.dev/github.com/microsoft/gocosmos[`gocosmos`^] driver is still experimental, but it has support for https://learn.microsoft.com/en-us/azure/cosmos-db/hierarchical-partition-keys[hierarchical partition keys^] as well as https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-query-container#cross-partition-query[cross-partition queries^]. Please refer to the https://github.com/microsoft/gocosmos/blob/main/SQL.md[SQL notes^] for details.
136-
131+
include::components:partial$drivers_note.adoc[]
137132

138133
*Type*: `string`
139134

140135

141136
```yml
142137
# Examples
143138

144-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60
139+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60"
145140

146141
dsn: foouser:foopassword@tcp(localhost:3306)/foodb
147142

modules/components/pages/inputs/sql_select.adoc

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Common::
2323
--
2424
2525
```yml
26-
# Common config fields, showing default values
26+
# Common configuration fields, showing default values
2727
input:
2828
label: ""
2929
sql_select:
3030
driver: "" # No default (required)
31-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60 # No default (required)
31+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60" # No default (required)
3232
table: foo # No default (required)
3333
columns: [] # No default (required)
3434
where: type = ? and created_at > ? # No default (optional)
@@ -42,12 +42,12 @@ Advanced::
4242
--
4343
4444
```yml
45-
# All config fields, showing default values
45+
# All configuration fields, showing default values
4646
input:
4747
label: ""
4848
sql_select:
4949
driver: "" # No default (required)
50-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60 # No default (required)
50+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60" # No default (required)
5151
table: foo # No default (required)
5252
columns: [] # No default (required)
5353
where: type = ? and created_at > ? # No default (optional)
@@ -136,20 +136,15 @@ The following is a list of supported drivers, their placeholder style, and their
136136

137137
include::components:partial$drivers_table.adoc[]
138138

139-
Please note that the `postgres` driver enforces SSL by default, you can override this with the parameter `sslmode=disable` if required.
140-
141-
The `snowflake` driver supports multiple DSN formats. Please consult https://pkg.go.dev/github.com/snowflakedb/gosnowflake#hdr-Connection_String[the docs^] for more details. For https://docs.snowflake.com/en/user-guide/key-pair-auth.html#configuring-key-pair-authentication[key pair authentication^], the DSN has the following format: `<snowflake_user>@<snowflake_account>/<db_name>/<schema_name>?warehouse=<warehouse>&role=<role>&authenticator=snowflake_jwt&privateKey=<base64_url_encoded_private_key>`, where the value for the `privateKey` parameter can be constructed from an unencrypted RSA private key file `rsa_key.p8` using `openssl enc -d -base64 -in rsa_key.p8 | basenc --base64url -w0` (you can use `gbasenc` insted of `basenc` on OSX if you install `coreutils` via Homebrew). If you have a password-encrypted private key, you can decrypt it using `openssl pkcs8 -in rsa_key_encrypted.p8 -out rsa_key.p8`. Also, make sure fields such as the username are URL-encoded.
142-
143-
The https://pkg.go.dev/github.com/microsoft/gocosmos[`gocosmos`^] driver is still experimental, but it has support for https://learn.microsoft.com/en-us/azure/cosmos-db/hierarchical-partition-keys[hierarchical partition keys^] as well as https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-query-container#cross-partition-query[cross-partition queries^]. Please refer to the https://github.com/microsoft/gocosmos/blob/main/SQL.md[SQL notes^] for details.
144-
139+
include::components:partial$drivers_note.adoc[]
145140

146141
*Type*: `string`
147142

148143

149144
```yml
150145
# Examples
151146

152-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60
147+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60"
153148

154149
dsn: foouser:foopassword@tcp(localhost:3306)/foodb
155150

modules/components/pages/outputs/sql_insert.adoc

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Common::
2323
--
2424
2525
```yml
26-
# Common config fields, showing default values
26+
# Common configuration fields, showing default values
2727
output:
2828
label: ""
2929
sql_insert:
3030
driver: "" # No default (required)
31-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60 # No default (required)
31+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60" # No default (required)
3232
table: foo # No default (required)
3333
columns: [] # No default (required)
3434
args_mapping: root = [ this.cat.meow, this.doc.woofs[0] ] # No default (required)
@@ -46,12 +46,12 @@ Advanced::
4646
--
4747
4848
```yml
49-
# All config fields, showing default values
49+
# All configuration fields, showing default values
5050
output:
5151
label: ""
5252
sql_insert:
5353
driver: "" # No default (required)
54-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60 # No default (required)
54+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60" # No default (required)
5555
table: foo # No default (required)
5656
columns: [] # No default (required)
5757
args_mapping: root = [ this.cat.meow, this.doc.woofs[0] ] # No default (required)
@@ -144,20 +144,15 @@ The following is a list of supported drivers, their placeholder style, and their
144144

145145
include::components:partial$drivers_table.adoc[]
146146

147-
Please note that the `postgres` driver enforces SSL by default, you can override this with the parameter `sslmode=disable` if required.
148-
149-
The `snowflake` driver supports multiple DSN formats. Please consult https://pkg.go.dev/github.com/snowflakedb/gosnowflake#hdr-Connection_String[the docs^] for more details. For https://docs.snowflake.com/en/user-guide/key-pair-auth.html#configuring-key-pair-authentication[key pair authentication^], the DSN has the following format: `<snowflake_user>@<snowflake_account>/<db_name>/<schema_name>?warehouse=<warehouse>&role=<role>&authenticator=snowflake_jwt&privateKey=<base64_url_encoded_private_key>`, where the value for the `privateKey` parameter can be constructed from an unencrypted RSA private key file `rsa_key.p8` using `openssl enc -d -base64 -in rsa_key.p8 | basenc --base64url -w0` (you can use `gbasenc` insted of `basenc` on OSX if you install `coreutils` via Homebrew). If you have a password-encrypted private key, you can decrypt it using `openssl pkcs8 -in rsa_key_encrypted.p8 -out rsa_key.p8`. Also, make sure fields such as the username are URL-encoded.
150-
151-
The https://pkg.go.dev/github.com/microsoft/gocosmos[`gocosmos`^] driver is still experimental, but it has support for https://learn.microsoft.com/en-us/azure/cosmos-db/hierarchical-partition-keys[hierarchical partition keys^] as well as https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-query-container#cross-partition-query[cross-partition queries^]. Please refer to the https://github.com/microsoft/gocosmos/blob/main/SQL.md[SQL notes^] for details.
152-
147+
include::components:partial$drivers_note.adoc[]
153148

154149
*Type*: `string`
155150

156151

157152
```yml
158153
# Examples
159154

160-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60
155+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60"
161156

162157
dsn: foouser:foopassword@tcp(localhost:3306)/foodb
163158

modules/components/pages/outputs/sql_raw.adoc

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Common::
2323
--
2424
2525
```yml
26-
# Common config fields, showing default values
26+
# Common configuration fields, showing default values
2727
output:
2828
label: ""
2929
sql_raw:
3030
driver: "" # No default (required)
31-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60 # No default (required)
31+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60" # No default (required)
3232
query: INSERT INTO footable (foo, bar, baz) VALUES (?, ?, ?); # No default (required)
3333
args_mapping: root = [ this.cat.meow, this.doc.woofs[0] ] # No default (optional)
3434
max_in_flight: 64
@@ -45,12 +45,12 @@ Advanced::
4545
--
4646
4747
```yml
48-
# All config fields, showing default values
48+
# All configuration fields, showing default values
4949
output:
5050
label: ""
5151
sql_raw:
5252
driver: "" # No default (required)
53-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60 # No default (required)
53+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60" # No default (required)
5454
query: INSERT INTO footable (foo, bar, baz) VALUES (?, ?, ?); # No default (required)
5555
unsafe_dynamic_query: false
5656
args_mapping: root = [ this.cat.meow, this.doc.woofs[0] ] # No default (optional)
@@ -140,20 +140,15 @@ The following is a list of supported drivers, their placeholder style, and their
140140

141141
include::components:partial$drivers_table.adoc[]
142142

143-
Please note that the `postgres` driver enforces SSL by default, you can override this with the parameter `sslmode=disable` if required.
144-
145-
The `snowflake` driver supports multiple DSN formats. Please consult https://pkg.go.dev/github.com/snowflakedb/gosnowflake#hdr-Connection_String[the docs^] for more details. For https://docs.snowflake.com/en/user-guide/key-pair-auth.html#configuring-key-pair-authentication[key pair authentication^], the DSN has the following format: `<snowflake_user>@<snowflake_account>/<db_name>/<schema_name>?warehouse=<warehouse>&role=<role>&authenticator=snowflake_jwt&privateKey=<base64_url_encoded_private_key>`, where the value for the `privateKey` parameter can be constructed from an unencrypted RSA private key file `rsa_key.p8` using `openssl enc -d -base64 -in rsa_key.p8 | basenc --base64url -w0` (you can use `gbasenc` insted of `basenc` on OSX if you install `coreutils` via Homebrew). If you have a password-encrypted private key, you can decrypt it using `openssl pkcs8 -in rsa_key_encrypted.p8 -out rsa_key.p8`. Also, make sure fields such as the username are URL-encoded.
146-
147-
The https://pkg.go.dev/github.com/microsoft/gocosmos[`gocosmos`^] driver is still experimental, but it has support for https://learn.microsoft.com/en-us/azure/cosmos-db/hierarchical-partition-keys[hierarchical partition keys^] as well as https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-query-container#cross-partition-query[cross-partition queries^]. Please refer to the https://github.com/microsoft/gocosmos/blob/main/SQL.md[SQL notes^] for details.
148-
143+
include::components:partial$drivers_note.adoc[]
149144

150145
*Type*: `string`
151146

152147

153148
```yml
154149
# Examples
155150

156-
dsn: clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60
151+
dsn: "clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms&max_execution_time=60"
157152

158153
dsn: foouser:foopassword@tcp(localhost:3306)/foodb
159154

0 commit comments

Comments
 (0)