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

Method WithAttTypMod

server/types/type.go:1067–1071  ·  view source on GitHub ↗

WithAttTypMod returns a copy of the type with attTypMod defined with given value. This function should be used to set attTypMod only, as it creates a copy of the type to avoid updating the original type.

(tm int32)

Source from the content-addressed store, hash-verified

1065// to set attTypMod only, as it creates a copy of the type
1066// to avoid updating the original type.
1067func (t *DoltgresType) WithAttTypMod(tm int32) *DoltgresType {
1068 newDt := *t
1069 newDt.attTypMod = tm
1070 return &newDt
1071}
1072
1073// Zero implements the types.ExtendedType interface.
1074func (t *DoltgresType) Zero() interface{} {

Callers 15

NewTimestampTypeFunction · 0.80
NewVarCharTypeFunction · 0.80
NewTimeTZTypeFunction · 0.80
NewBitTypeFunction · 0.80
NewCharTypeFunction · 0.80
NewVarBitTypeFunction · 0.80
NewTimeTypeFunction · 0.80
ArrayBaseTypeMethod · 0.80
BaseTypeMethod · 0.80
ToArrayTypeMethod · 0.80
NewTimestampTZTypeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected