sqlfmt

package
v1.80.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatSQL

func FormatSQL(sql string, maxWidth int) string

FormatSQL pretty-prints a SQL SELECT statement for human reading. It tokenizes the input, uppercases keywords, aligns clauses, indents continuation lines, and wraps SELECT column lists one-per-line when there are multiple columns. maxWidth controls soft line wrapping; pass 0 to disable wrapping.

Types

This section is empty.

Jump to

Keyboard shortcuts

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