Skip to content

Commit

Permalink
Merge branch 'master' into fix-594
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ledin committed Dec 24, 2016
2 parents e5c0fa0 + 5253b34 commit ef7fa4c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,17 @@ ctx.run(rawQuery(1))
//SELECT id AS "_1", name AS "_2" FROM my_entity WHERE id = 1
```

You can implement comparison operators by defining implicit conversion and using infix.

```scala
import java.util.Date

implicit class DateQuotes(left: Date) {
def >(right: Date) = quote(infix"$left > $right".as[Boolean])

def <(right: Date) = quote(infix"$left < $right".as[Boolean])
}
```

Custom encoding
---------------
Expand Down

0 comments on commit ef7fa4c

Please sign in to comment.