Funx.Predicate.GreaterThan (funx v0.8.4)
View SourcePredicate that checks if a value is strictly greater than a reference value
using an Ord comparator.
Options
:value(required) The reference value to compare against.:ord(optional) An ordering comparator. Defaults toFunx.Ord.Protocol.
Examples
use Funx.Predicate
# Check if score is greater than 0
pred do
check :score, {GreaterThan, value: 0}
end
# With custom Ord comparator
pred do
check :date, {GreaterThan, value: start_date, ord: Date.Ord}
end