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

Function filterOverloads

pkg/sql/sem/tree/overload.go:763–775  ·  view source on GitHub ↗

filterOverloads filters overloads which do not satisfy the predicate.

(
	overloads []overloadImpl, overloadIdxs []uint8, fn func(overloadImpl) bool,
)

Source from the content-addressed store, hash-verified

761
762// filterOverloads filters overloads which do not satisfy the predicate.
763func filterOverloads(
764 overloads []overloadImpl, overloadIdxs []uint8, fn func(overloadImpl) bool,
765) []uint8 {
766 for i := 0; i < len(overloadIdxs); {
767 if fn(overloads[overloadIdxs[i]]) {
768 i++
769 } else {
770 overloadIdxs[i], overloadIdxs[len(overloadIdxs)-1] = overloadIdxs[len(overloadIdxs)-1], overloadIdxs[i]
771 overloadIdxs = overloadIdxs[:len(overloadIdxs)-1]
772 }
773 }
774 return overloadIdxs
775}
776
777// defaultTypeCheck type checks the constant and placeholder expressions without a preference
778// and adds them to the type checked slice.

Callers 1

typeCheckOverloadedExprsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…