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

Function GetOmniNode

backend/plugin/parser/plsql/omni.go:115–124  ·  view source on GitHub ↗

GetOmniNode extracts the omni AST node from a base.AST interface. Returns the node and true if it is an OmniAST, nil and false otherwise.

(a base.AST)

Source from the content-addressed store, hash-verified

113// GetOmniNode extracts the omni AST node from a base.AST interface.
114// Returns the node and true if it is an OmniAST, nil and false otherwise.
115func GetOmniNode(a base.AST) (ast.Node, bool) {
116 if a == nil {
117 return nil, false
118 }
119 omniAST, ok := a.(*OmniAST)
120 if !ok {
121 return nil, false
122 }
123 return omniAST.Node, true
124}
125
126// ByteOffsetToRunePosition converts a byte offset in sql to a 1-based line:column
127// where column is measured in Unicode code points (runes), matching storepb.Position semantics.

Callers 3

TestOracleOmniASTWrapperFunction · 0.70
GetStatementTypesFunction · 0.70

Calls

no outgoing calls

Tested by 2

TestOracleOmniASTWrapperFunction · 0.56