ArgsByRowIdx returns the argument set of the row at idx.
(ctx context.Context, idx int)
| 510 | |
| 511 | // ArgsByRowIdx returns the argument set of the row at idx. |
| 512 | func (wfr *WindowFrameRun) ArgsByRowIdx(ctx context.Context, idx int) (Datums, error) { |
| 513 | row, err := wfr.Rows.GetRow(ctx, idx) |
| 514 | if err != nil { |
| 515 | return nil, err |
| 516 | } |
| 517 | datums := make(Datums, len(wfr.ArgsIdxs)) |
| 518 | for i, argIdx := range wfr.ArgsIdxs { |
| 519 | datums[i], err = row.GetDatum(int(argIdx)) |
| 520 | if err != nil { |
| 521 | return nil, err |
| 522 | } |
| 523 | } |
| 524 | return datums, nil |
| 525 | } |
| 526 | |
| 527 | // valueAt returns the first argument of the window function at the row idx. |
| 528 | func (wfr *WindowFrameRun) valueAt(ctx context.Context, idx int) (Datum, error) { |
no test coverage detected