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

Function WithStrictMode

pkg/sql/parser/parser.go:194–198  ·  view source on GitHub ↗

WithStrictMode enables strict parsing mode. In strict mode, the parser rejects empty statements (e.g., lone semicolons like ";;; SELECT 1 ;;;" will error instead of silently discarding empty statements between semicolons). By default, the parser operates in lenient mode where empty statements are s

()

Source from the content-addressed store, hash-verified

192// By default, the parser operates in lenient mode where empty statements are
193// silently ignored for backward compatibility.
194func WithStrictMode() ParserOption {
195 return func(p *Parser) {
196 p.strict = true
197 }
198}
199
200// WithDialect sets the SQL dialect for dialect-aware parsing.
201// Supported values: "postgresql", "mysql", "sqlserver", "oracle", "sqlite", etc.

Callers 4

parseSQLStrictFunction · 0.85

Calls

no outgoing calls

Tested by 4

parseSQLStrictFunction · 0.68