[#3775] Let QueryPart.toString() generate formatted SQL