sqlfmt

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareSemantic

func CompareSemantic(sql string, formattedSql string) bool

CompareSemantic compares a formatted SQL string with the original input and checks whether they are logically still the same.

func Format

func Format(sql string, options *formatters.Options) (string, error)

Format formats a single SQL statement using the given options.

func FormatFile

func FormatFile(src []byte, options *formatters.Options) ([]byte, error)

FormatFile formats a SQL file containing multiple statements separated by semicolons. It preserves comments between statements and returns the formatted file content.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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