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

Method RowIter

server/node/call.go:80–94  ·  view source on GitHub ↗

RowIter implements the interface sql.ExecSourceRel.

(ctx *sql.Context, r sql.Row)

Source from the content-addressed store, hash-verified

78
79// RowIter implements the interface sql.ExecSourceRel.
80func (c *Call) RowIter(ctx *sql.Context, r sql.Row) (sql.RowIter, error) {
81 if c.CompiledFunc == nil || !c.CompiledFunc.Resolved() {
82 return nil, errors.New("cannot call unresolved procedure")
83 }
84 if !core.IsContextValid(ctx) {
85 return nil, errors.New("invalid context while attempting to call a procedure")
86 }
87
88 cf := c.CompiledFunc.SetStatementRunner(ctx, c.Runner.Runner).(*framework.CompiledFunction)
89 _, err := cf.Eval(ctx, nil)
90 if err != nil {
91 return nil, err
92 }
93 return sql.RowsToRowIter(), nil
94}
95
96// Schema implements the interface sql.ExecSourceRel.
97func (c *Call) Schema(ctx *sql.Context) sql.Schema {

Callers

nothing calls this directly

Calls 4

IsContextValidFunction · 0.92
EvalMethod · 0.65
ResolvedMethod · 0.45
SetStatementRunnerMethod · 0.45

Tested by

no test coverage detected