aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorvlad <vlad@driver.xyz>2018-01-25 14:13:07 -0800
committervlad <vlad@driver.xyz>2018-01-25 14:13:07 -0800
commit3dd31307563576031e11607f04547d3a6fc84344 (patch)
tree11a948bb4794a404404c12dc61000829735ed6bd /README.md
parenta0877d81ca2844d75dc361b5ce7c99afacd6e25f (diff)
downloadrest-query-3dd31307563576031e11607f04547d3a6fc84344.tar.gz
rest-query-3dd31307563576031e11607f04547d3a6fc84344.tar.bz2
rest-query-3dd31307563576031e11607f04547d3a6fc84344.zip
Extracting query library
Diffstat (limited to 'README.md')
-rw-r--r--README.md20
1 files changed, 18 insertions, 2 deletions
diff --git a/README.md b/README.md
index 74faee6..a0d1c11 100644
--- a/README.md
+++ b/README.md
@@ -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")
+)
+```