sqlfmt
sqlfmt copied to clipboard
SQL formatter with width-aware output
[Example](https://sqlfum.pt/?n=74&indent=4&spaces=0&simplify=0&align=3&case=upper&sql=Q1JFQVRFIFRBQkxFIHQgKAogIGNyZWF0ZWRfYXQgVElNRVNUQU1QIERFRkFVTFQgY3VycmVudF90aW1lc3RhbXAgTk9UIE5VTEwKKTs%3D) ```sql CREATE TABLE t ( created_at TIMESTAMP DEFAULT current_timestamp NOT NULL ); ``` generates ```sql CREATE TABLE t ( created_at TIMESTAMP DEFAULT current_timestamp() NOT NULL ); ``` Note the...
`select row(1, 2)` is removed even with simplify off
this will allow huge queries to not blindly fail. also show errors when the request returns an error.
It appears that functions are not implemented. I would think function would be pretty standard across dialects though from what I understand this is still a work in progress. It...
https://github.com/jondot/goweight says: ``` 9.9 MB github.com/cockroachdb/cockroach/pkg/roachpb 7.0 MB github.com/cockroachdb/cockroach/vendor/github.com/DataDog/zstd 6.2 MB github.com/cockroachdb/cockroach/pkg/sql/sem/tree 4.5 MB github.com/cockroachdb/cockroach/pkg/sql/sem/builtins 4.2 MB github.com/cockroachdb/cockroach/pkg/sql/sqlbase 3.4 MB github.com/cockroachdb/cockroach/pkg/sql/parser 3.4 MB net/http 3.2 MB github.com/cockroachdb/cockroach/vendor/github.com/Shopify/sarama 3.0 MB runtime...
I've definitely ran `make` in the `$GOPATH/src/github.com/cockroachdb/cockroach` dir, but still seem to be getting this undefined errors. ``` ➜ sqlfmt git:(master) bash build.sh + IMG=gcr.io/hots-cockroach/sqlfmt:latest + go build -o sqlfmt...
Hi, Do you have any plans on pretty printing JSON values? For example, something like "INSERT INTO my_table (json_col) VALUES ('{ ... a long JSON document ... }');" prints the...
Maybe have a function that wraps node types with annotations and a configuration file that maps node types to colors and another that shows how to output color (i.e., html,...
C.f., ```sql SELECT DISTINCT category0_.id AS id1_0_0_, segmentati1_.category_id AS category1_9_1_, segmentati1_.segmentation_id AS segmenta2_9_1_, segmentati2_.id AS id1_8_2_, inputtype3_.id AS id1_4_3_, operator5_.id AS id1_5_4_, configurat6_.key AS key1_1_5_, configurat6_.segmentation_id AS segmenta2_1_5_, options7_.key AS...
On https://sqlfum.pt/, `SELECT d1 AT TIME ZONE 'Europe/Paris' FROM t1` produces error message : > unimplemented at or near "from" `date AT TIME ZONE timezone` is a somehow classic construct....