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

Function isExplainableInner

backend/plugin/parser/doris/query.go:83–92  ·  view source on GitHub ↗

isExplainableInner reports whether `node` is a shape that EXPLAIN can legitimately wrap (SELECT family or DML). DDL inside EXPLAIN is rejected: Doris only supports EXPLAIN on query and DML statements.

(node ast.Node)

Source from the content-addressed store, hash-verified

81// legitimately wrap (SELECT family or DML). DDL inside EXPLAIN is rejected:
82// Doris only supports EXPLAIN on query and DML statements.
83func isExplainableInner(node ast.Node) bool {
84 switch node.(type) {
85 case *ast.SelectStmt, *ast.SetOpStmt:
86 return true
87 case *ast.InsertStmt, *ast.UpdateStmt, *ast.DeleteStmt,
88 *ast.MergeStmt, *ast.TruncateTableStmt:
89 return true
90 }
91 return false
92}

Callers 1

isReadOnlyASTFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected