Documentation ¶
Index ¶
- Constants
- func BeginsWith(value1 interface{}, value2 interface{}) bool
- func Contains(value1 interface{}, value2 interface{}) bool
- func EndsWith(value1 interface{}, value2 interface{}) bool
- func Equal(value1 interface{}, value2 interface{}) bool
- func Float32(value1 float32, value2 float32) int
- func Float64(value1 float64, value2 float64) int
- func GreaterThan(value1 interface{}, value2 interface{}) bool
- func Int(value1 int, value2 int) int
- func Int16(value1 int16, value2 int16) int
- func Int32(value1 int32, value2 int32) int
- func Int64(value1 int64, value2 int64) int
- func Int8(value1 int8, value2 int8) int
- func Interface(value1 interface{}, value2 interface{}) (int, error)
- func LessThan(value1 interface{}, value2 interface{}) bool
- func String(value1 string, value2 string) int
- func UInt(value1 uint, value2 uint) int
- func UInt16(value1 uint16, value2 uint16) int
- func UInt32(value1 uint32, value2 uint32) int
- func UInt64(value1 uint64, value2 uint64) int
- func UInt8(value1 uint8, value2 uint8) int
- func WithOperator(value1 interface{}, operator string, value2 interface{}) (bool, error)
- type Stringer
Constants ¶
const OperatorBeginsWith = "BEGINS"
OperatorBeginsWith represents a "begins with" comparison , when used in Predicates and Criteria. It is only valid for string values.
const OperatorContainedBy = "CONTAINED BY"
OperatorContainedBy represents a "contains" comparison in reverse, when used in Predicates and Criteria. It is only valid for string values.
const OperatorContains = "CONTAINS"
OperatorContains represents a "contains" comparison, when used in Predicates and Criteria. It is only valid for string values.
const OperatorEndsWith = "ENDS"
OperatorEndsWith represents a "ends with" comparison, when used in Predicates and Criteria. It is only valid for string values.
const OperatorEqual = "="
OperatorEqual represents an "equals" comparison, when used in Predicates and Criteria
const OperatorGreaterOrEqual = ">="
OperatorGreaterOrEqual represents an "greater or equal" comparison, when used in Predicates and Criteria
const OperatorGreaterThan = ">"
OperatorGreaterThan represents an "greater than" comparison, when used in Predicates and Criteria
const OperatorLessOrEqual = "<="
OperatorLessOrEqual represents an "less or equal" comparison, when used in Predicates and Criteria
const OperatorLessThan = "<"
OperatorLessThan represents a "less than" comparison, when used in Predicates and Criteria
const OperatorNotEqual = "!="
OperatorNotEqual represents a "not equals" comparison, when used in Predicates and Criteria
Variables ¶
This section is empty.
Functions ¶
func BeginsWith ¶
func BeginsWith(value1 interface{}, value2 interface{}) bool
BeginsWith is a simple "generic-safe" function for string comparison. It returns TRUE if value1 begins with value2
func Contains ¶
func Contains(value1 interface{}, value2 interface{}) bool
Contains is a simple "generic-safe" function for string comparison. It returns TRUE if value1 contains value2
func EndsWith ¶
func EndsWith(value1 interface{}, value2 interface{}) bool
EndsWith is a simple "generic-safe" function for string comparison. It returns TRUE if value1 ends with value2
func Equal ¶
func Equal(value1 interface{}, value2 interface{}) bool
Equal is a simplified version of Compare. It ONLY returns true if the two provided values are EQUAL. In all other cases (including errors) it returns FALSE
func Float32 ¶
Float32 compares two float32 values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func Float64 ¶
Float64 compares two float64 values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func GreaterThan ¶
func GreaterThan(value1 interface{}, value2 interface{}) bool
GreaterThan is a simplified version of Compare. It ONLY returns true if value1 is verifiably GREATER THAN value2. In all other cases (including errors) it returns FALSE
func Int ¶
Int compares two int values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func Int16 ¶
Int16 compares two int16 values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func Int32 ¶
Int32 compares two int32 values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func Int64 ¶
Int64 compares two int64 values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func Int8 ¶
Int8 compares two int8 values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func Interface ¶
Interface tries its best to muscle value2 and value2 into compatable types so that they can be compared. If value1 is LESS THAN value2, it returns -1, nil If value1 is EQUAL TO value2, it returns 0, nil If value1 is GREATER THAN value2, it returns 1, nil If the two values are not compatable, then it returns 0, [DERP] with an explanation of the error. Currently, this function ONLLY compares identical numeric or string types. In the future, it *may* be expanded to perform simple type converstions between similar types.
func LessThan ¶
func LessThan(value1 interface{}, value2 interface{}) bool
LessThan is a simplified version of Compare. It ONLY returns true if value1 is verifiably LESS THAN value2. In all other cases (including errors) it returns FALSE
func String ¶
String compares two string values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func UInt ¶
UInt compares two uint values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func UInt16 ¶
UInt16 compares two uint16 values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func UInt32 ¶
UInt32 compares two uint32 values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func UInt64 ¶
UInt64 compares two uint64 values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func UInt8 ¶
UInt8 compares two uint8 values. It returns -1 if value1 is LESS THAN value2. It returns 0 if value1 is EQUAL TO value2. It returns 1 if value1 is GREATER THAN value2.
func WithOperator ¶
WithOperator uses an operator to compare two values, and returns TRUE or FALSE