RowIter implements the interface sql.ExecSourceRel.
(ctx *sql.Context, r sql.Row)
| 78 | |
| 79 | // RowIter implements the interface sql.ExecSourceRel. |
| 80 | func (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. |
| 97 | func (c *Call) Schema(ctx *sql.Context) sql.Schema { |
nothing calls this directly
no test coverage detected