ability to order embeded items (closes #509)

This commit is contained in:
Ruslan Talpa
2016-05-21 20:52:13 +03:00
parent 2cb04c1d5c
commit 45d0f85b0d
6 changed files with 64 additions and 13 deletions
+7
View File
@@ -38,6 +38,13 @@ pRequestFilter (k, v) = (,) <$> path <*> (Filter <$> fld <*> op <*> val)
op = fst <$> opVal
val = snd <$> opVal
pRequestOrder :: (String, String) -> Either ParseError (Path, [OrderTerm])
pRequestOrder (k, v) = (,) <$> path <*> ord
where
treePath = parse pTreePath ("failed to parser tree path (" ++ k ++ ")") k
path = fst <$> treePath
ord = parse pOrder ("failed to parse order (" ++ v ++ ")") v
ws :: Parser Text
ws = cs <$> many (oneOf " \t")