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

Function NewInterpreterStack

server/plpgsql/interpreter_stack.go:73–84  ·  view source on GitHub ↗

NewInterpreterStack creates a new InterpreterStack.

(runner sql.StatementRunner)

Source from the content-addressed store, hash-verified

71
72// NewInterpreterStack creates a new InterpreterStack.
73func NewInterpreterStack(runner sql.StatementRunner) InterpreterStack {
74 stack := utils.NewStack[*InterpreterScopeDetails]()
75 // This first push represents the function base, including parameters
76 stack.Push(&InterpreterScopeDetails{
77 variables: make(map[string]*interpreterVariable),
78 })
79 return InterpreterStack{
80 stack: stack,
81 runner: runner,
82 cursors: make(map[string]*cursorState),
83 }
84}
85
86// Details returns the details for the current scope.
87func (is *InterpreterStack) Details() *InterpreterScopeDetails {

Callers 4

CallFunction · 0.85
TriggerCallFunction · 0.85
ParseFunction · 0.85

Calls 1

PushMethod · 0.80