Skip to content

Commit

Permalink
Add link to Predicate gem in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
blambeau committed Jun 26, 2024
1 parent 0b6de4e commit 3fa617a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 3fa617a

Please sign in to comment.