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

Function ParseMySQLOmni

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

ParseMySQLOmni parses SQL using omni's parser and returns an ast.List. This is the recommended entry point for new code that needs omni AST nodes.

(sql string)

Source from the content-addressed store, hash-verified

28// ParseMySQLOmni parses SQL using omni's parser and returns an ast.List.
29// This is the recommended entry point for new code that needs omni AST nodes.
30func ParseMySQLOmni(sql string) (*ast.List, error) {
31 return mysqlparser.Parse(sql)
32}
33
34// IsKeyword reports whether s is a registered MySQL keyword.
35func IsKeyword(s string) bool {

Callers 13

validateQueryFunction · 0.85
prepareTransformationFunction · 0.85
parseCTEPrefixFunction · 0.85
parseMySQLStatementFunction · 0.85
mustMySQLOmniNodeFunction · 0.85
extractCTETablesMethod · 0.85
parseTableReferencesMethod · 0.85
getOmniQuerySpanMethod · 0.85
parseMySQLStatementsFunction · 0.85
findFirstDMLFunction · 0.85
extractStatementFunction · 0.85

Calls

no outgoing calls

Tested by 3

mustMySQLOmniNodeFunction · 0.68
TestExtractTableRefsFunction · 0.68