MCPcopy Index your code
hub / github.com/cockscomb/cel2sql / isTimestampRelatedType

Function isTimestampRelatedType

cel2sql.go:157–164  ·  view source on GitHub ↗
(typ *exprpb.Type)

Source from the content-addressed store, hash-verified

155}
156
157func isTimestampRelatedType(typ *exprpb.Type) bool {
158 abstractType := typ.GetAbstractType()
159 if abstractType != nil {
160 name := abstractType.GetName()
161 return name == "DATE" || name == "TIME" || name == "DATETIME"
162 }
163 return typ.GetWellKnown() == exprpb.Type_TIMESTAMP
164}
165
166func isDateType(typ *exprpb.Type) bool {
167 return typ.GetAbstractType() != nil && typ.GetAbstractType().GetName() == "DATE"

Callers 2

visitCallBinaryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected