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

Function ParseStatements

backend/plugin/parser/base/interface.go:292–298  ·  view source on GitHub ↗

ParseStatements parses the SQL statement and returns ParsedStatement objects with both text and AST. This is the new unified parsing function.

(engine storepb.Engine, statement string)

Source from the content-addressed store, hash-verified

290// ParseStatements parses the SQL statement and returns ParsedStatement objects with both text and AST.
291// This is the new unified parsing function.
292func ParseStatements(engine storepb.Engine, statement string) ([]ParsedStatement, error) {
293 f, ok := statementParsers[engine]
294 if !ok {
295 return nil, errors.Errorf("engine %s is not supported for ParseStatements", engine)
296 }
297 return f(statement)
298}
299
300func RegisterGetStatementTypes(engine storepb.Engine, f GetStatementTypesFunc) {
301 mux.Lock()

Calls 2

fFunction · 0.85
ErrorfMethod · 0.80