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

Method Signature

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

Signature returns a human-readable signature. If simplify is bool, tuple-returning functions with just 1 tuple element unwrap the return type in the signature.

(simplify bool)

Source from the content-addressed store, hash-verified

122// If simplify is bool, tuple-returning functions with just
123// 1 tuple element unwrap the return type in the signature.
124func (b Overload) Signature(simplify bool) string {
125 retType := b.FixedReturnType()
126 if simplify {
127 if retType.Family() == types.TupleFamily && len(retType.TupleContents()) == 1 {
128 retType = &retType.TupleContents()[0]
129 }
130 }
131 return fmt.Sprintf("(%s) -> %s", b.Types.String(), retType)
132}
133
134// overloadImpl is an implementation of an overloaded function. It provides
135// access to the parameter type list and the return type of the implementation.

Callers 1

helpWithFunctionFunction · 0.80

Calls 4

FixedReturnTypeMethod · 0.95
FamilyMethod · 0.80
TupleContentsMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected