MCPcopy Create free account
hub / github.com/dolthub/doltgresql / GetCurrentLabel

Method GetCurrentLabel

server/plpgsql/interpreter_stack.go:98–106  ·  view source on GitHub ↗

GetCurrentLabel traverses the stack (starting from the top) returning the first label found. Returns an empty string if no labels were set.

()

Source from the content-addressed store, hash-verified

96// GetCurrentLabel traverses the stack (starting from the top) returning the first label found. Returns an empty string
97// if no labels were set.
98func (is *InterpreterStack) GetCurrentLabel() string {
99 for i := 0; i < is.stack.Len(); i++ {
100 label := is.stack.PeekDepth(i).label
101 if len(label) > 0 {
102 return label
103 }
104 }
105 return ""
106}
107
108// GetVariable traverses the stack (starting from the top) to find a variable with a matching name. Returns nil if no
109// variable was found.

Callers 2

AppendOperationsMethod · 0.80
AppendOperationsMethod · 0.80

Calls 2

PeekDepthMethod · 0.80
LenMethod · 0.65

Tested by

no test coverage detected