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

Function IsSchemaChangingStatement

backend/plugin/parser/trino/query_type.go:105–108  ·  view source on GitHub ↗

IsSchemaChangingStatement reports whether the node is a DDL statement.

(node ast.Node)

Source from the content-addressed store, hash-verified

103
104// IsSchemaChangingStatement reports whether the node is a DDL statement.
105func IsSchemaChangingStatement(node ast.Node) bool {
106 queryType, _ := getQueryType(node)
107 return queryType == base.DDL
108}
109
110// containsSystemSchema reports whether a query references a Trino system/metadata
111// schema, via a case-insensitive substring scan. This mirrors the legacy

Callers 2

TestTrinoParserFunction · 0.85

Calls 1

getQueryTypeFunction · 0.70

Tested by 2

TestTrinoParserFunction · 0.68