Skip to content

Commit fa8cb46

Browse files
committed
Update documentation to include Clickhouse dialect everywhere
1 parent 7312aee commit fa8cb46

File tree

7 files changed

+13
-4
lines changed

7 files changed

+13
-4
lines changed

.github/ISSUE_TEMPLATE/vscode-sql-formatter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ body:
1616
multiple: true
1717
options:
1818
- Google BigQuery
19+
- Clickhouse
1920
- IBM DB2 for LUW (Linux, Unix, Windows)
2021
- IBM DB2 for iSystem
2122
- Apache Hive
@@ -44,6 +45,7 @@ body:
4445
options:
4546
- Rely on VSCode to detect the relevant SQL dialect
4647
- Google BigQuery
48+
- Clickhouse
4749
- IBM DB2 for LUW (Linux, Unix, Windows)
4850
- IBM DB2 for iSystem
4951
- Apache Hive

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
It started as a port of a [PHP Library][], but has since considerably diverged.
88

99
It supports various SQL dialects:
10-
GCP BigQuery, IBM DB2, DuckDB, Apache Hive, MariaDB, MySQL, TiDB, Couchbase N1QL, Oracle PL/SQL, PostgreSQL, Amazon Redshift, SingleStoreDB, Snowflake, Spark, SQL Server Transact-SQL, Trino (and Presto).
10+
GCP BigQuery, Clickhouse, IBM DB2, DuckDB, Apache Hive, MariaDB, MySQL, TiDB, Couchbase N1QL, Oracle PL/SQL, PostgreSQL, Amazon Redshift, SingleStoreDB, Snowflake, Spark, SQL Server Transact-SQL, Trino (and Presto).
1111
See [language option docs](docs/language.md) for more details.
1212

1313
It does not support:
@@ -123,7 +123,7 @@ sql-formatter -h
123123

124124
```
125125
usage: sql-formatter [-h] [-o OUTPUT] \
126-
[-l {bigquery,db2,db2i,hive,mariadb,mysql,n1ql,plsql,postgresql,redshift,singlestoredb,snowflake,spark,sql,sqlite,tidb,transactsql,trino,tsql}] [-c CONFIG] [--version] [FILE]
126+
[-l {bigquery,clickhouse,db2,db2i,hive,mariadb,mysql,n1ql,plsql,postgresql,redshift,singlestoredb,snowflake,spark,sql,sqlite,tidb,transactsql,trino,tsql}] [-c CONFIG] [--version] [FILE]
127127
128128
SQL Formatter
129129
@@ -135,7 +135,7 @@ optional arguments:
135135
-o, --output OUTPUT
136136
File to write SQL output (defaults to stdout)
137137
--fix Update the file in-place
138-
-l, --language {bigquery,db2,db2i,hive,mariadb,mysql,n1ql,plsql,postgresql,redshift,singlestoredb,snowflake,spark,sql,sqlite,tidb,trino,tsql}
138+
-l, --language {bigquery,clickhouse,db2,db2i,hive,mariadb,mysql,n1ql,plsql,postgresql,redshift,singlestoredb,snowflake,spark,sql,sqlite,tidb,trino,tsql}
139139
SQL dialect (defaults to basic sql)
140140
-c, --config CONFIG
141141
Path to config JSON file or json string (will find a file named '.sql-formatter.json' or use default configs if unspecified)

docs/dialect.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ The following dialects can be imported from `"sql-formatter"` module:
2222

2323
- `sql` - [Standard SQL][]
2424
- `bigquery` - [GCP BigQuery][]
25+
- `clickhouse` - [Clickhouse][]
2526
- `db2` - [IBM DB2][]
2627
- `db2i` - [IBM DB2i][] (experimental)
2728
- `duckdb` - [DuckDB][]
@@ -72,6 +73,7 @@ You likely only want to use this if your other alternative is to fork SQL Format
7273

7374
[standard sql]: https://en.wikipedia.org/wiki/SQL:2011
7475
[gcp bigquery]: https://cloud.google.com/bigquery
76+
[clickhouse]: https://clickhouse.com/
7577
[ibm db2]: https://www.ibm.com/analytics/us/en/technology/db2/
7678
[ibm db2i]: https://www.ibm.com/docs/en/i/7.5?topic=overview-db2-i
7779
[duckdb]: https://duckdb.org/

docs/language.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const result = format('SELECT * FROM tbl', { language: 'sqlite' });
1414

1515
- `"sql"` - (default) [Standard SQL][]
1616
- `"bigquery"` - [GCP BigQuery][]
17+
- `"clickhouse"` - [Clickhouse][]
1718
- `"db2"` - [IBM DB2][]
1819
- `"db2i"` - [IBM DB2i][] (experimental)
1920
- `"duckdb"` - [DuckDB][]
@@ -49,6 +50,7 @@ See docs for [dialect][] option.
4950

5051
[standard sql]: https://en.wikipedia.org/wiki/SQL:2011
5152
[gcp bigquery]: https://cloud.google.com/bigquery
53+
[clickhouse]: https://clickhouse.com/
5254
[ibm db2]: https://www.ibm.com/analytics/us/en/technology/db2/
5355
[ibm db2i]: https://www.ibm.com/docs/en/i/7.5?topic=overview-db2-i
5456
[duckdb]: https://duckdb.org/

docs/params.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ The placeholder types available by default depend on SQL dialect used:
109109

110110
- sql - `?`
111111
- bigquery - `?`, `@name`, `` @`name` ``
112+
- clickhouse - `{name:Type}`
112113
- db2 - `?`, `:name`
113114
- db2i - `?`, `:name`
114115
- hive - _no support_

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"presto",
4141
"prestosql",
4242
"snowflake",
43-
"duckdb"
43+
"duckdb",
44+
"clickhouse"
4445
],
4546
"files": [
4647
"dist",

schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"enum": [
4242
"sql",
4343
"bigquery",
44+
"clickhouse",
4445
"db2",
4546
"db2i",
4647
"duckdb",

0 commit comments

Comments
 (0)