protected function parseLimit(SQLSelect $query)
    {
        $limit = '';
        $offset = '0';
        if (is_array($query->getLimit())) {
            $limitArr = $query->getLimit();
            if (isset($limitArr['limit'])) {
                $limit = $limitArr['limit'];
            }
            if (isset($limitArr['start'])) {
                $offset = $limitArr['start'];
            }
        } elseif (preg_match('/^([0-9]+) offset ([0-9]+)$/i', trim($query->getLimit()), $matches)) {
            $limit = $matches[1];
            $offset = $matches[2];
        } else {
            //could be a comma delimited string
            $bits = explode(',', $query->getLimit());
            if (sizeof($bits) > 1) {
                list($offset, $limit) = $bits;
            } else {
                $limit = $bits[0];
            }
        }
        return array($limit, $offset);
    }