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

Function MustBeDStringOrDNull

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

MustBeDStringOrDNull attempts to retrieve a DString or DNull from an Expr, panicking if the assertion fails.

(e Expr)

Source from the content-addressed store, hash-verified

1228// MustBeDStringOrDNull attempts to retrieve a DString or DNull from an Expr, panicking if the
1229// assertion fails.
1230func MustBeDStringOrDNull(e Expr) DString {
1231 i, ok := AsDString(e)
1232 if !ok && e != DNull {
1233 panic(errors.AssertionFailedf("expected *DString or DNull, found %T", e))
1234 }
1235 return i
1236}
1237
1238// ResolvedType implements the TypedExpr interface.
1239func (*DString) ResolvedType() *types.T {

Callers

nothing calls this directly

Calls 1

AsDStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…