formatter

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package formatter contains sqio's lightweight SQL formatter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(sql string, opts Options) string

Format returns a normalized SQL string using sqio's conservative formatter. It tokenizes SQL before changing keyword/identifier case, so comments and literal contents are not modified.

Types

type Options

type Options struct {
	Dialect        string
	Indent         int
	KeywordCase    string
	IdentifierCase string
	LineWidth      int
}

Options controls SQL formatting behavior requested by CLI flags or config. Unsupported options are retained so config can evolve without changing the public service boundary.

Jump to

Keyboard shortcuts

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