I think this function is not neccesary anymore, it can be inlined in `formatQuery`