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

Method NewVariableAlias

server/plpgsql/interpreter_stack.go:206–214  ·  view source on GitHub ↗

NewVariableAlias creates a new variable alias, named |alias|, in the current frame of this stack, pointing to the specified |variable|.

(alias string, target string)

Source from the content-addressed store, hash-verified

204// NewVariableAlias creates a new variable alias, named |alias|, in the current frame of this stack,
205// pointing to the specified |variable|.
206func (is *InterpreterStack) NewVariableAlias(alias string, target string) {
207 for i := 0; i < is.stack.Len(); i++ {
208 if iv, ok := is.stack.PeekDepth(i).variables[target]; ok {
209 // TODO: this won't work for RECORD types
210 is.stack.Peek().variables[alias] = iv
211 break
212 }
213 }
214}
215
216// PushScope creates a new scope.
217func (is *InterpreterStack) PushScope() {

Callers 1

callFunction · 0.80

Calls 3

PeekDepthMethod · 0.80
LenMethod · 0.65
PeekMethod · 0.45

Tested by

no test coverage detected