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

Function NewImplicitCast

server/expression/implicit_cast.go:35–43  ·  view source on GitHub ↗

NewImplicitCast returns a new *ImplicitCast expression.

(expr sql.Expression, fromType *pgtypes.DoltgresType, toType *pgtypes.DoltgresType)

Source from the content-addressed store, hash-verified

33
34// NewImplicitCast returns a new *ImplicitCast expression.
35func NewImplicitCast(expr sql.Expression, fromType *pgtypes.DoltgresType, toType *pgtypes.DoltgresType) *ImplicitCast {
36 toType = checkForDomainType(toType)
37 fromType = checkForDomainType(fromType)
38 return &ImplicitCast{
39 expr: expr,
40 sourceType: fromType,
41 targetType: toType,
42 }
43}
44
45// Children implements the sql.Expression interface.
46func (ic *ImplicitCast) Children() []sql.Expression {

Callers 1

WithChildrenMethod · 0.85

Calls 1

checkForDomainTypeFunction · 0.85

Tested by

no test coverage detected