MCPcopy Create free account
hub / github.com/LissaGreense/GO4SQL / isGreaterThan

Method isGreaterThan

engine/generic_value.go:116–128  ·  view source on GitHub ↗

isGreaterThan implementations

(secondValue ValueInterface)

Source from the content-addressed store, hash-verified

114
115// isGreaterThan implementations
116func (value IntegerValue) isGreaterThan(secondValue ValueInterface) bool {
117 nullValue, isNull := secondValue.(NullValue)
118 if isNull {
119 return nullValue.isSmallerThan(value)
120 }
121
122 secondValueAsInteger, isInteger := secondValue.(IntegerValue)
123 if !isInteger {
124 log.Fatal("Can't compare Integer with other type")
125 }
126
127 return value.Value > secondValueAsInteger.Value
128}
129func (value StringValue) isGreaterThan(secondValue ValueInterface) bool {
130 nullValue, isNull := secondValue.(NullValue)
131 if isNull {

Callers 1

TestIsGreaterThanFunction · 0.95

Calls 1

isSmallerThanMethod · 0.65

Tested by 1

TestIsGreaterThanFunction · 0.76