formatted query.pp like bigcouch/query.pp