public function limit($query)
    {
        $clause = '';

        if (!empty($query->limit)) {
            switch ($query->operation['type']) {
                case AnDomainQuery::QUERY_SELECT_DEFAULT :
                case AnDomainQuery::QUERY_SELECT  :
                    $clause = ' LIMIT '.$query->offset.' , '.$query->limit;
                    break;
                case AnDomainQuery::QUERY_UPDATE :
                    if ((int) $query->limit > 0) {
                        $clause = ' LIMIT '.$query->limit;
                    }
                    break;
            }
        }

        return $clause;
    }