/**
  * Render sql select limit
  *
  * @return  $this
  */
 protected function _renderLimit()
 {
     if ($this->_pageSize) {
         $this->_select->limitPage($this->getCurPage(), $this->_pageSize);
     }
     return $this;
 }
 /**
  * @param \Magento\Framework\DB\Select $select
  * @throws \Exception
  */
 public function filterResults(Select $select)
 {
     $page = $this->request->getQuery('page', 1);
     if (!is_numeric($page)) {
         throw new \Exception("Page {$page} is not a valid integer");
     }
     $limit = $this->request->getQuery('limit', 100);
     if (!is_numeric($limit)) {
         throw new \Exception("Limit {$limit} is not a valid integer");
     }
     $select->limitPage((int) $page, (int) $limit);
 }