sqlfmt

package module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

sqlfmt

make project as module

Used

go get github.com/labulakalia/sqlfmt

TODO

  • remove unused package WIP

Fork From https://github.com/mjibson/sqlfmt

Experimental SQL formatter with width-aware output

Based on http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf.

Requires having the master branch of https://github.com/cockroachdb/cockroach checked out at $GOPATH/src/github.com/cockroachdb/cockroach, and running make in that directory.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatSQL

func FormatSQL(stmt string) (string, error)

Types

This section is empty.

Directories

Path Synopsis
cockroach
pkg/sql/lexbase/allkeywords
all-keywords generates sql/lexbase/keywords.go from sql.y.
all-keywords generates sql/lexbase/keywords.go from sql.y.
pkg/sql/oidext
Package oidext contains oids that are not in `github.com/lib/pq/oid` as they are not shipped by default with postgres.
Package oidext contains oids that are not in `github.com/lib/pq/oid` as they are not shipped by default with postgres.
pkg/sql/pgwire/pgcode
Package pgcode defines the PostgreSQL 5-character support codes used throughout the CockroachDB source tree.
Package pgcode defines the PostgreSQL 5-character support codes used throughout the CockroachDB source tree.
pkg/sql/pgwire/pgwirebase
Package pgwirebase contains type definitions and very basic protocol structures to be used by both the pgwire package and by others (particularly by the sql package).
Package pgwirebase contains type definitions and very basic protocol structures to be used by both the pgwire package and by others (particularly by the sql package).
pkg/sql/sem/catid
Package catid is a low-level package exporting ID types.
Package catid is a low-level package exporting ID types.
pkg/sql/sem/tree/treebin
Package treebin contains the implementation-agnostic information about all binary operators that we support.
Package treebin contains the implementation-agnostic information about all binary operators that we support.
pkg/sql/sem/tree/treecmp
Package treecmp contains the implementation-agnostic information about all comparison operators that we support.
Package treecmp contains the implementation-agnostic information about all comparison operators that we support.
pkg/sql/sem/tree/treewindow
Package treewindow contains some constants describing window-function specific options.
Package treewindow contains some constants describing window-function specific options.
pkg/util/encoding/csv
Package csv reads and writes comma-separated values (CSV) files.
Package csv reads and writes comma-separated values (CSV) files.
pkg/util/pretty
Package pretty prints documents based on a target line width.
Package pretty prints documents based on a target line width.
pkg/util/syncutil/singleflight
Package singleflight provides a duplicate function call suppression mechanism.
Package singleflight provides a duplicate function call suppression mechanism.
pkg/util/timeutil/pgdate
Package pgdate contains parsing functions and types for dates and times in a manner that is compatible with PostgreSQL.
Package pgdate contains parsing functions and types for dates and times in a manner that is compatible with PostgreSQL.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL