MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / ArgsByRowIdx

Method ArgsByRowIdx

pkg/sql/sem/tree/window_funcs.go:512–525  ·  view source on GitHub ↗

ArgsByRowIdx returns the argument set of the row at idx.

(ctx context.Context, idx int)

Source from the content-addressed store, hash-verified

510
511// ArgsByRowIdx returns the argument set of the row at idx.
512func (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.
528func (wfr *WindowFrameRun) valueAt(ctx context.Context, idx int) (Datum, error) {

Callers 1

ArgsWithRowOffsetMethod · 0.95

Calls 2

GetRowMethod · 0.80
GetDatumMethod · 0.80

Tested by

no test coverage detected