MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / IsAdditiveType

Function IsAdditiveType

pkg/sql/types/types.go:2004–2015  ·  view source on GitHub ↗

IsAdditiveType returns true if the given type supports addition and subtraction.

(t *T)

Source from the content-addressed store, hash-verified

2002// IsAdditiveType returns true if the given type supports addition and
2003// subtraction.
2004func IsAdditiveType(t *T) bool {
2005 switch t.Family() {
2006 case IntFamily:
2007 return true
2008 case FloatFamily:
2009 return true
2010 case DecimalFamily:
2011 return true
2012 default:
2013 return IsDateTimeType(t)
2014 }
2015}
2016
2017// IsWildcardTupleType returns true if this is the wildcard AnyTuple type. The
2018// wildcard type matches a tuple type having any number of fields (including 0).

Callers 1

normalizeMethod · 0.92

Calls 2

IsDateTimeTypeFunction · 0.85
FamilyMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…