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

Function MustBeDString

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

MustBeDString attempts to retrieve a DString from an Expr, panicking if the assertion fails.

(e Expr)

Source from the content-addressed store, hash-verified

1218// MustBeDString attempts to retrieve a DString from an Expr, panicking if the
1219// assertion fails.
1220func MustBeDString(e Expr) DString {
1221 i, ok := AsDString(e)
1222 if !ok {
1223 panic(errors.AssertionFailedf("expected *DString, found %T", e))
1224 }
1225 return i
1226}
1227
1228// MustBeDStringOrDNull attempts to retrieve a DString or DNull from an Expr, panicking if the
1229// assertion fails.

Callers 4

FormatMethod · 0.85
JSONExistsAnyFunction · 0.85
GetJSONPathFunction · 0.85
FormatURIMethod · 0.85

Calls 1

AsDStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…