Last param is callback function, receiving err + result, no need to keep passing two functions, the query handler and the final callback. It should be easier to understand now as query handler was in a position where it had to know about receiving a callback, that was exposing an implementation detail of PgQueryRunner.