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

Function arrayOfType

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

arrayOfType returns a fresh DArray of the input type.

(typ *types.T)

Source from the content-addressed store, hash-verified

4325
4326// arrayOfType returns a fresh DArray of the input type.
4327func arrayOfType(typ *types.T) (*DArray, error) {
4328 if typ.Family() != types.ArrayFamily {
4329 return nil, errors.AssertionFailedf("array node type (%v) is not types.TArray", typ)
4330 }
4331 if err := types.CheckArrayElementType(typ.ArrayContents()); err != nil {
4332 return nil, err
4333 }
4334 return NewDArray(typ.ArrayContents()), nil
4335}
4336
4337// Eval implements the TypedExpr interface.
4338func (t *Array) Eval(ctx *EvalContext) (Datum, error) {

Callers 2

EvalMethod · 0.85
EvalMethod · 0.85

Calls 4

CheckArrayElementTypeFunction · 0.92
NewDArrayFunction · 0.85
FamilyMethod · 0.80
ArrayContentsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…