format

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expression

func Expression(expression pgsql.SyntaxNode, builder *OutputBuilder) (string, error)

func Statement

func Statement(statement pgsql.Statement, builder *OutputBuilder) (string, error)

func SyntaxNode

func SyntaxNode(node pgsql.SyntaxNode) (string, error)

Types

type Formatted

type Formatted struct {
	Statement  string
	Parameters map[string]any
}

type OutputBuilder

type OutputBuilder struct {
	MaterializeParameters bool
	StripLiterals         bool
	// contains filtered or unexported fields
}

func NewOutputBuilder

func NewOutputBuilder() *OutputBuilder

func (*OutputBuilder) Build

func (s *OutputBuilder) Build() string

func (*OutputBuilder) HasOutput

func (s *OutputBuilder) HasOutput() bool

func (*OutputBuilder) WithMaterializedParameters

func (s *OutputBuilder) WithMaterializedParameters(parameters map[string]any) *OutputBuilder

func (*OutputBuilder) Write

func (s *OutputBuilder) Write(values ...any)

Jump to

Keyboard shortcuts

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