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

Function jsonbAssignment

server/cast/jsonb.go:356–364  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

354
355// jsonbAssignment registers all assignment casts. This comprises only the source types.
356func jsonbAssignment(builtInCasts map[id.Cast]casts.Cast) {
357 framework.MustAddAssignmentTypeCast(builtInCasts, framework.TypeCast{
358 FromType: pgtypes.JsonB,
359 ToType: pgtypes.Json,
360 Function: func(ctx *sql.Context, val any, _, targetType *pgtypes.DoltgresType) (any, error) {
361 return pgtypes.JsonB.IoOutput(ctx, val)
362 },
363 })
364}

Callers 1

initJsonBFunction · 0.85

Calls 2

IoOutputMethod · 0.80

Tested by

no test coverage detected