diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -1,3 +1,19 @@ -# PDS UI Common Library +# REST Query library -To make a change, create a PR, merge to master, do `sbt scalafmt`, follow instructions. +Allows to read queries from the REST requests (query parameters) and map them to the typed SQL Slick queries. +Supports ANDs and ORs, pagination and sorting. + +Queries can be build in the code as well (e.g., for testing): + +``` +SearchFilterExpr.Atom.NAry("id", In, objects.map(x => Long.box(x.id))) +``` + +or + +``` +SearchFilterExpr.Union(Seq( + SearchFilterExpr.Atom.Binary("status", Eq, "New"), + SearchFilterExpr.Atom.Binary("status", Eq, "Verified") +) +``` |