MCPcopy Create free account
hub / github.com/bytebase/bytebase / ParsePg

Function ParsePg

backend/plugin/parser/pg/omni.go:28–30  ·  view source on GitHub ↗

ParsePg parses SQL using omni's parser and returns omni Statement objects directly. This is the recommended entry point for new code that needs omni AST nodes.

(sql string)

Source from the content-addressed store, hash-verified

26// ParsePg parses SQL using omni's parser and returns omni Statement objects directly.
27// This is the recommended entry point for new code that needs omni AST nodes.
28func ParsePg(sql string) ([]omnipg.Statement, error) {
29 return omnipg.Parse(sql)
30}
31
32// GetOmniNode extracts the omni AST node from a base.AST interface.
33// Returns the node and true if it is an OmniAST, nil and false otherwise.

Calls

no outgoing calls