Documentation
¶
Overview ¶
Package printer implements AST → formatted Oracle SQL output.
The printer walks an AST and emits syntactically valid Oracle SQL with configurable formatting (keyword case, indentation). Primary entry point: Fprint(w, node) or Print(node).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fprint ¶
Fprint prints a formatted representation of node to w using default config.
func FprintWithConfig ¶
FprintWithConfig prints using the given config.
func Print ¶
Print returns the formatted SQL string for an AST node using default config.
Types ¶
type Config ¶
type Config struct {
KeywordCase KeywordCase // UpperCase (default) or LowerCase
IndentMode IndentMode // IndentSpace (default) or IndentTab
IndentSize int // chars per indent level; 0 defaults to 2
LineWidth int // max chars per line; 0 = no limit
}
Config holds printer formatting options.
type IndentMode ¶
type IndentMode int
IndentMode controls the indentation character.
const ( IndentSpace IndentMode = iota // indent with spaces (default) IndentTab // indent with tabs )
type KeywordCase ¶
type KeywordCase int
KeywordCase controls how SQL keywords are rendered.
const ( UpperCase KeywordCase = iota LowerCase )
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer holds the internal state for printing an AST.
Source Files
¶
- create_type.go
- expr.go
- match_recognize.go
- plsql.go
- printer.go
- sqlplus.go
- stmt.go
- types.go
Click to show internal directories.
Click to hide internal directories.