MCPcopy Create free account
hub / github.com/dolthub/doltgresql / MustAddAssignmentTypeCast

Function MustAddAssignmentTypeCast

server/functions/framework/cast.go:49–61  ·  view source on GitHub ↗

MustAddAssignmentTypeCast registers the given assignment type cast. Panics if an error occurs.

(builtInCasts map[id.Cast]casts.Cast, cast TypeCast)

Source from the content-addressed store, hash-verified

47
48// MustAddAssignmentTypeCast registers the given assignment type cast. Panics if an error occurs.
49func MustAddAssignmentTypeCast(builtInCasts map[id.Cast]casts.Cast, cast TypeCast) {
50 castID := id.NewCast(cast.FromType.ID, cast.ToType.ID)
51 if _, ok := builtInCasts[castID]; ok {
52 panic("duplicate built-in cast")
53 }
54 builtInCasts[castID] = casts.Cast{
55 ID: castID,
56 CastType: casts.CastType_Assignment,
57 Function: id.NullFunction,
58 BuiltIn: cast.Function,
59 UseInOut: false,
60 }
61}
62
63// MustAddImplicitTypeCast registers the given implicit type cast. Panics if an error occurs.
64func MustAddImplicitTypeCast(builtInCasts map[id.Cast]casts.Cast, cast TypeCast) {

Callers 15

boolAssignmentFunction · 0.92
regclassAssignmentFunction · 0.92
numericAssignmentFunction · 0.92
int64AssignmentFunction · 0.92
timestampAssignmentFunction · 0.92
varcharAssignmentFunction · 0.92
timeTZAssignmentFunction · 0.92
float64AssignmentFunction · 0.92
regprocAssignmentFunction · 0.92
jsonbAssignmentFunction · 0.92
intervalAssignmentFunction · 0.92
textAssignmentFunction · 0.92

Calls 1

NewCastFunction · 0.92

Tested by

no test coverage detected