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

Function textAssignment

server/cast/text.go:34–42  ·  view source on GitHub ↗

textAssignment registers all assignment casts. This comprises only the source types.

(builtInCasts map[id.Cast]casts.Cast)

Source from the content-addressed store, hash-verified

32
33// textAssignment registers all assignment casts. This comprises only the source types.
34func textAssignment(builtInCasts map[id.Cast]casts.Cast) {
35 framework.MustAddAssignmentTypeCast(builtInCasts, framework.TypeCast{
36 FromType: pgtypes.Text,
37 ToType: pgtypes.InternalChar,
38 Function: func(ctx *sql.Context, val any, _, targetType *pgtypes.DoltgresType) (any, error) {
39 return handleStringCast(val.(string), targetType)
40 },
41 })
42}
43
44// textImplicit registers all implicit casts. This comprises only the source types.
45func textImplicit(builtInCasts map[id.Cast]casts.Cast) {

Callers 1

initTextFunction · 0.85

Calls 2

handleStringCastFunction · 0.85

Tested by

no test coverage detected