protected function addLimit($limit, $offset = null) {
        $limitQuery = '';

        if (intval($limit) > 0) {
            $limitQuery .= $this->getDriverEscaper()->dbCommand('LIMIT') . ' ' . $limit;  
            if (!is_null($offset)) {
                $limitQuery .= ' ' . $this->getDriverEscaper()->dbCommand('OFFSET') . ' ' . $offset;
            }
        }
        

        return $limitQuery;
    }