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

Function AsDTuple

pkg/sql/sem/tree/datum.go:2912–2920  ·  view source on GitHub ↗

AsDTuple attempts to retrieve a *DTuple from an Expr, returning a *DTuple and a flag signifying whether the assertion was successful. The function should be used instead of direct type assertions wherever a *DTuple wrapped by a *DOidWrapper is possible.

(e Expr)

Source from the content-addressed store, hash-verified

2910// be used instead of direct type assertions wherever a *DTuple wrapped by a
2911// *DOidWrapper is possible.
2912func AsDTuple(e Expr) (*DTuple, bool) {
2913 switch t := e.(type) {
2914 case *DTuple:
2915 return t, true
2916 case *DOidWrapper:
2917 return AsDTuple(t.Wrapped)
2918 }
2919 return nil, false
2920}
2921
2922// maybePopulateType populates the tuple's type if it hasn't yet been
2923// populated.

Callers 1

EvalMethod · 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…