protected function __render_condition($row)
    {
        if (count($row) === 3) {
            list($field, $cond, $value) = $row;
        } elseif (count($row) === 2) {
            list($field, $cond) = $row;
        } elseif (count($row) === 1) {
            list($field) = $row;
        }

        $field = $this->_consume($field, 'soft-escape');

        if (count($row) == 1) {
            // Only a single parameter was passed, so we simply include all
            return $field;
        }

        // below are only cases when 2 or 3 arguments are passed

        // if no condition defined - set default condition
        if (count($row) == 2) {
            $value = $cond;

            if (is_array($value)) {
                $cond = 'in';
            } elseif ($value instanceof self && $value->mode === 'select') {
                $cond = 'in';
            } else {
                $cond = '=';
            }
        } else {
            $cond = trim(strtolower($cond));
        }

        // below we can be sure that all 3 arguments has been passed

        // special conditions (IS | IS NOT) if value is null
        if ($value === null) {
            if ($cond === '=') {
                $cond = 'is';
            } elseif (in_array($cond, ['!=', '<>', 'not'])) {
                $cond = 'is not';
            }
        }

        // value should be array for such conditions
        if (in_array($cond, ['in', 'not in', 'not']) && is_string($value)) {
            $value = array_map('trim', explode(',', $value));
        }

        // special conditions (IN | NOT IN) if value is array
        if (is_array($value)) {
            $value = '('.implode(',', $this->_param($value)).')';
            $cond = in_array($cond, ['!=', '<>', 'not', 'not in']) ? 'not in' : 'in';

            return $field.' '.$cond.' '.$value;
        }

        // if value is object, then it should be Expression or Query itself
        // otherwise just escape value
        $value = $this->_consume($value, 'param');

        return $field.' '.$cond.' '.$value;
    }