Use a PandoQuery class to encapsulate pagination