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

Method NewVariable

server/plpgsql/interpreter_stack.go:192–194  ·  view source on GitHub ↗

NewVariable creates a new variable in the current scope. If a variable with the same name exists in a previous scope, then that variable will be shadowed until the current scope exits.

(name string, typ *pgtypes.DoltgresType)

Source from the content-addressed store, hash-verified

190// NewVariable creates a new variable in the current scope. If a variable with the same name exists in a previous scope,
191// then that variable will be shadowed until the current scope exits.
192func (is *InterpreterStack) NewVariable(name string, typ *pgtypes.DoltgresType) {
193 is.NewVariableWithValue(name, typ, typ.Zero())
194}
195
196// NewVariableWithValue creates a new variable in the current scope, setting its initial value to the one given.
197func (is *InterpreterStack) NewVariableWithValue(name string, typ *pgtypes.DoltgresType, val any) {

Callers 1

callFunction · 0.80

Calls 2

NewVariableWithValueMethod · 0.95
ZeroMethod · 0.80

Tested by

no test coverage detected