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)
| 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. |
| 28 | func 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. |
no outgoing calls