From 3fa617a4673333e74f890e1e725b2681e697f931 Mon Sep 17 00:00:00 2001 From: Bernard Lambeau Date: Wed, 26 Jun 2024 21:05:25 +0200 Subject: [PATCH] Add link to Predicate gem in README. --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 6b29350..7f47690 100644 --- a/README.md +++ b/README.md @@ -354,6 +354,28 @@ r.unwrap(:a) # shortcut over unwrap([:a]) r.where(predicate) # alias for restrict(predicate) ``` +## Supported Predicates + +Usual operators are supported and map to their SQL equivalent as expected: + +```ruby +Predicate.eq # = +Predicate.neq # <> +Predicate.lt # < +Predicate.lte # <= +Predicate.gt # > +Predicate.gte # >= +Predicate.in # SQL's IN +Predicate.is_null # SQL's IS NULL +``` + +See the [Predicate gem](https://github.com/enspirit/predicate) for a more +complete list. + +Note: predicates that implement specific Ruby algorithms or patterns are +not compiled to SQL (and more generally not delegated to underlying database +servers). + ## How is this different? ### ... from similar libraries?