adding a printer for query expressions - its a debug-only feature - makes it easier to analyze the queries

I think it can all be public.