Creates a MongoDB-alike query string from a sequence of complex conditions, vice versa.