OK, this has been tricky and has taken me a couple of weeks to work through. It still has a couple of bits missing but I think it's at a good place.
The biggest difference is search queries are now arbitrarily composable. There are basic terms like seen or subject("foobar") and they can be joined with boolean operations and, or and not.
In D it's pretty verbose though. You can see in the unittests in searchquery.d. I'm not sure if this is a problem or if it can be made less verbose; I'm still not 100% up to speed with idiomatic D.
In SIL it's less verbose and I think quite OK. By using import * from imap.query each of the terms and operators are brought into immediate scope and creating a search query expression is fairly straight forward and much simpler than trying to document the SEARCH syntax from RFC3501.
OK, this has been tricky and has taken me a couple of weeks to work through. It still has a couple of bits missing but I think it's at a good place.
The biggest difference is search queries are now arbitrarily composable. There are basic terms like
seen
orsubject("foobar")
and they can be joined with boolean operationsand
,or
andnot
.In D it's pretty verbose though. You can see in the
unittest
s insearchquery.d
. I'm not sure if this is a problem or if it can be made less verbose; I'm still not 100% up to speed with idiomatic D.In SIL it's less verbose and I think quite OK. By using
import * from imap.query
each of the terms and operators are brought into immediate scope and creating a search query expression is fairly straight forward and much simpler than trying to document theSEARCH
syntax from RFC3501.