MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / ForEachBinOp

Method ForEachBinOp

pkg/sql/sem/tree/eval.go:498–508  ·  view source on GitHub ↗

ForEachBinOp iterates the BinOps in the set.

(f func(op *BinOp) error)

Source from the content-addressed store, hash-verified

496
497// ForEachBinOp iterates the BinOps in the set.
498func (o *BinOpOverloads) ForEachBinOp(f func(op *BinOp) error) error {
499 if o == nil {
500 return nil
501 }
502 for _, ol := range o.overloads {
503 if err := f(ol); err != nil {
504 return iterutil.Map(err)
505 }
506 }
507 return nil
508}
509
510func (o *BinOpOverloads) len() int { return len(o.overloads) }
511func (o *BinOpOverloads) get(i int) overloadImpl { return o.overloads[i] }

Callers 2

FindBinaryOverloadFunction · 0.80
initFunction · 0.80

Calls 1

MapFunction · 0.92

Tested by

no test coverage detected