MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / AST

Struct AST

pkg/sql/ast/ast.go:1877–1880  ·  view source on GitHub ↗

AST represents the root of the Abstract Syntax Tree produced by parsing one or more SQL statements. AST is obtained from the pool via NewAST and must be returned via ReleaseAST when the caller no longer needs it: tree, err := p.ParseFromModelTokens(tokens) if err != nil { return err } defer ast

Source from the content-addressed store, hash-verified

1875// SQL() returns the canonical SQL string for all statements joined by ";\n".
1876// Span() returns the union of all statement spans for source-location tracking.
1877type AST struct {
1878 Statements []Statement
1879 Comments []models.Comment // Comments captured during tokenization, preserved during formatting
1880}
1881
1882// TokenLiteral implements Node. Returns an empty string - the AST root has no
1883// representative keyword.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected