format

package
v1.58.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package format lays out schema SQL without changing the statements it reads. It works on the token stream, so the identifiers, the keywords and the expressions come out exactly as they were written; only the whitespace between the tokens moves. The one exception is a quoted identifier that does not need its quotes, which is unquoted after the change is proved to leave the statement's meaning alone.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(sql string) (string, error)

Format returns sql laid out. It fails when sql does not parse, and when the result would not carry the same tokens as the input.

Types

This section is empty.

Jump to

Keyboard shortcuts

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