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

Method UpdateRecord

server/plpgsql/interpreter_stack.go:291–300  ·  view source on GitHub ↗

UpdateRecord finds the named variable and sets its schema and row value.

(name string, schema sql.Schema, val sql.Row)

Source from the content-addressed store, hash-verified

289
290// UpdateRecord finds the named variable and sets its schema and row value.
291func (is *InterpreterStack) UpdateRecord(name string, schema sql.Schema, val sql.Row) error {
292 for i := 0; i < is.stack.Len(); i++ {
293 if iv, ok := is.stack.PeekDepth(i).variables[name]; ok {
294 iv.Record = schema
295 iv.Value = val
296 return nil
297 }
298 }
299 return fmt.Errorf("record variable `%s` could not be found", name)
300}

Callers 1

callFunction · 0.80

Calls 3

PeekDepthMethod · 0.80
LenMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected