@param Field $field
@param array $attributes

@return $this
763272
protected function parseColumnType(Field $field, array $attributes)
    {
        $type = Type::retrieveTypeObject(strtolower($attributes['type']));
        
        $type->setLength(isset($attributes['length']) ? (integer) $attributes['length'] : 0);
        $type->setPrecision(isset($attributes['precision']) ? (integer) $attributes['precision'] : 0);
        
        switch (true) {
            case $type instanceof EnumType:
                $enumeration = explode(',', $attributes['enum']);
                $enumeration = array_map('trim', $enumeration);
                
                $type->setExtra($enumeration);
                break;
            
            case $type instanceof DatetimeType:
                if (isset($attributes['format'])) {
                    $type->setExtra(['format' => $attributes['format'],]);
                }
                break;
            
            case $type instanceof SimpleArrayType:
                if (isset($attributes['separator'])) {
                    $type->setExtra(['separator' => $attributes['separator'],]);
                }
                break;
            
            default:
                break;
        }
        
        $field->setType($type);
        
        return $this;
    }
1231822
public function setField(FieldContract $field)
    {
        $this->setParams($field->getAttributes());
        $this->field = $field;
        return $this;
    }
553390
public function fields($fields)
    {
        $fields = is_array($fields) && func_num_args() === 1 ? $fields : func_get_args();
        $this->_parts['fields'] = Set::merge($this->_parts['fields'], $fields);
        return $this;
    }
408518
public function fields($fields) {

        if ( is_array($fields) ) {
            $this->fields = '`'.implode("`, `", $fields).'`';
        } else if ( is_string($fields) ) {
            $this->fields = $fields;
        } else {
            $this->fields = '*';
        }
        return $this;
    }
1312342
public function withAttributes(array $attributes)
    {
        $this->attributes = $this->immutable + $attributes + $this->attributes;

        return $this;
    }
365706
private static function setAttr(array $attributes, $field, $name, $type)
    {
        $attrs = '';

        if (in_array($type, array_keys(self::$preAttrs))) {
            $attributes = self::$preAttrs[$type] + $attributes;
        }

        if ($name !== null) {
            $attributes = array( 'name' => $name ) + $attributes;
        }

        if ($type !== 'select' && $type !== 'textarea' && $type !== 'form') {
            $attributes = array( 'type' => $type ) + $attributes;
        }

        foreach ($attributes as $key => $val) {
            $attrs .= ' ' . $key . '="' . self::entities($val) . '"';
        }

        return str_replace('{{attr}}', $attrs, $field);
    }
1270232
protected function fields(array $fields) {
        if (!empty($fields)) {
            if (!is_numeric(key($fields))) {
                $fields = array_keys($fields);
            }
            $this->insertFields = $fields;
        }
        return $this;
    }
26574
public function select($fields)
    {
        $this->select = array_merge(
            $this->select,
            Arr::wrap($fields)
        );

        return $this;
    }
428052
public function fields($fields)
    {
        if (!is_array($fields)) {
            $fields = func_get_args();
        }

        $this->fields = array_merge($this->fields, $fields);

        return $this;
    }
1328816
public function setFields(array $fields)
    {
        foreach ($fields as $name => $value) {
            $this->setField($name, $value);
        }

        $this->prepareQuery();

        return $this;
    }
233225
public function fields($fields = [])
    {
        $this->builder->select([]);
        $this->casts = [];

        if (empty($fields)) {
            foreach ($this->model->fields() as $field) {
                $this->assignField($field);
            }

            return $this;
        }

        foreach ($fields as $field) {
            $this->assignField($this->model->field($field));
        }

        return $this;
    }
425009
public function setFields($fields)
    {
        $data = @unserialize($fields);
        if ($fields === 'b:0;' || $data !== false) {
            $this->fields = $fields;
        } else {
            $this->fields = serialize($fields);
        }

        return $this;
    }
1304277
public function removeField($field)
    {
        $field = $this->resolveAlias($field);

        unset($this->fields[$field], $this->data[$field]);

        return $this;
    }
1123178
public function setField($field)
    {
        if(is_string($field)) {
            $field = new FieldIdentifier($field);
        }
        $this->field = $field;
        return $this;
    }
339819
public function setTableAttributes(array $attributes)
    {
        foreach ($attributes as $attribute => $value) {
            $this->tableAttributes[$attribute] = $value;
        }

        return $this;
    }
542741
public function setAttributes($attributes) {
		if (is_array($attributes) && empty($attributes)) {
			$this->attributes = new \stdClass;
		} else {
			$this->attributes = $attributes;
		}

		return $this;
	}
1077207
public function setFieldData($field, $data)
    {
        if (is_array($this->data)) {
            $this->data[$field] = $data;
        } else {
            $this->data->$field = $data;
        }
        return $this;
    }