diff --git a/CHANGELOG.md b/CHANGELOG.md index 22062fcae..9f92b46d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased ### Added -- Option to specify nulls first or last, eg /people?order=age.desc.nullsfirst +- Option to specify nulls first or last, eg `/people?order=age.desc.nullsfirst` +- Filter nulls, `?col=is.null` and `?col=isnot.null` ## [0.2.7.0] - 2015-03-03 ### Added diff --git a/test/Feature/QuerySpec.hs b/test/Feature/QuerySpec.hs index 2029be092..2bfcbaa78 100644 --- a/test/Feature/QuerySpec.hs +++ b/test/Feature/QuerySpec.hs @@ -34,6 +34,10 @@ spec = , matchHeaders = ["Content-Range" <:> "0-2/3"] } + it "matches nulls" $ + get "/no_pk?a=is.null" `shouldRespondWith` + [json| [{"a": null, "b": null}] |] + it "matches with like" $ do get "/simple_pk?k=like.*yx" `shouldRespondWith` "[{\"k\":\"xyyx\",\"extra\":\"u\"}]"