Skip to content

Commit

Permalink
Update code docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuprog committed Jul 13, 2020
1 parent 21b8db8 commit 3279c50
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/query_builder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ defmodule QueryBuilder do
```
QueryBuilder.where(query, [role: :permissions], name@permissions: :write)
```
OR clauses may be passed through last argument `opts`. For example:
```elixir
QueryBuilder.where(query, [], [firstname: "John"], or: [firstname: "Alice", lastname: "Doe"], or: [firstname: "Bob"])
```
"""
def where(query, assoc_fields, filters, opts \\ []) do
ensure_query_has_binding(query)
Expand Down

0 comments on commit 3279c50

Please sign in to comment.