@param string              $columnName The column name
@param FilterTypeInterface $type       The filter type
@param string              $filterName The name of the filter
@param array               $options    Options

@return FilterBuilder
15250
public function add($columnName, FilterTypeInterface $type = null, $filterName = null, array $options = array())
    {
        $this->filterDefinitions[$columnName] = array(
            'type' => $type,
            'options' => $options,
            'filtername' => $filterName,
        );

        return $this;
    }
235635
public function column(string $columnName): ColumnTypeDefiner
    {
        return new ColumnTypeDefiner(
            $this,
            function (Column $column) {
                $this->addColumn($column);
            },
            $columnName
        );
    }
967316
public function setAutoFilter($filteredColumnName, $filteredValue)
    {
        if (!is_string($filteredColumnName)) {
            throw new InvalidArgumentException('setAutoFilter only accepts string as argument.');
        }
        if (!isset($filteredColumnName)) {
            throw new InvalidArgumentException('filteredValue must be set.');
        }
        $this->filteredColumnName = $filteredColumnName;
        $this->filteredValue = $filteredValue;
        return $this;
    }
380366
public function filter($name, array $options = [])
    {
        if (static::EXT_FILTER === parent::filter($name, $options) and isset($this->filters[$name])) {
            $filter = new $this->filters[$name]($this, $options);
            $filter->run();
        }
    }
519018
public function has($key, $filter, $options = null) {
		if (is_string($filter))
			$filter=array($filter);
		if (is_int(strpos($key,'.'))) {
			list($key,$fkey) = explode('.',$key,2);
			if (!isset($this->hasCond[$key.'.']))
				$this->hasCond[$key.'.'] = array();
			$this->hasCond[$key.'.'][$fkey] = array($filter,$options);
		} else {
			if (!isset($this->fieldConf[$key]))
				trigger_error(sprintf(self::E_UNKNOWN_FIELD,$key,get_called_class()),E_USER_ERROR);
			if (!isset($this->fieldConf[$key]['relType']))
				trigger_error(self::E_HAS_COND,E_USER_ERROR);
			$this->hasCond[$key] = array($filter,$options);
		}
		return $this;
	}
1178579
public function findByWhereFilter($name, $filter, $orderColumn = null, $orderType = NULL) {
        $this->load();
        $mapper = MapperBuilder::buildFromName($this->mapping, $name);

        $query = "SELECT * FROM `" . $mapper->getTable() . "` ";
        $query .= "WHERE 1 ";
        if (!is_null($filter)) {
            $query .= "AND " . $filter;
        }

        if (!is_null($orderColumn)) {
            $query .= "ORDER BY `$orderColumn` ";
            if (!is_null($orderType)) {
                $query .= "$orderType";
            } else {
                $query .= "ASC ";
            }
        }

        $result = $this->getDataSource()->query($query);

        if ($result) {
            $collection = new Collection($mapper->getClass(), $result, $mapper);
        } else {
            $collection = new Collection($mapper->getClass(), array(), $mapper);
        }

        return $collection;
    }
295702
public function useFilter($filterString, $filterName = '')
    {
        $filterName = $filterName === '' ? $filterString : $filterName;

        $nameWasPassedAndFilterIsAllreadySet = $filterName !== '' && $this->queryToBuild->getFilterQuery($filterName) !== null;
        if($nameWasPassedAndFilterIsAllreadySet) {
            return $this;
        }
        $this->queryToBuild->addFilterQuery(['key' => $filterName, 'query' => $filterString]);
        return $this;
    }
536992
public function filter($name, array $options = [])
    {
        if (method_exists($this, $filter = 'filter' . ucfirst($name))) {
            call_user_func_array([$this, $filter], is_array($options) ? $options : []);

            return static::INT_FILTER;
        }

        return static::EXT_FILTER;
    }
457078
public static function processSingleColumn($column_name, $column_options, $data, $options = []) {
		$result = [];
		// process domain
		if (!empty($options['process_domains'])) {
			$temp = [$column_name => $column_options];
			$temp = \Object\Data\Common::processDomainsAndTypes($temp);
			$column_options = $temp[$column_name];
		}
		// if we ignoring not set fields
		if (!empty($options['ignore_not_set_fields']) && !array_key_exists($column_name, $data)) {
			return $result;
		}
		// processing
		$value = $data[$column_name] ?? null;
		if (is_array($value)) {
			$result2 = [];
			foreach ($value as $k => $v) {
				$temp = self::processSingleColumnType($column_name, $column_options, $v, ['ignore_defaults' => $options['ignore_defaults'] ?? false]);
				if (array_key_exists($column_name, $temp) && $temp[$column_name] !== null) {
					$result2[] = $temp[$column_name];
				}
			}
			$result[$column_name] = $result2;
		} else {
			$result = self::processSingleColumnType($column_name, $column_options, $value, ['ignore_defaults' => $options['ignore_defaults'] ?? false]);
		}
		return $result;
	}
89849
public function addFilter($column, $filter, $value): void
    {
        if (!$this->checkFilterColumn($column)) {
            throw new GridException("Filter for column `$column` is not allowed");
        }
        if (!$this->checkFilterName($filter)) {
            throw new GridException('Filter name is incorrect');
        }
        if (!isset($this->filters[$column])) {
            $this->filters[$column] = [];
        }
        $this->filters[$column][$filter] = $value;
    }
936748
public function updateOne(array $filter, $update, array $options = [])
    {
        list($bulkOptions, $options) = self::extractBulkWriteOptions($options);
        $model = new UpdateOne($filter, $update, $options);

        $bulkWriteResult = $this->bulkWrite([$model], $bulkOptions);

        return new UpdateResult($bulkWriteResult);
    }
1131139
public function filterField($fieldName, array $options = array())
    {
        $filter = '';

        $internalType = $this->_context->type($fieldName);

        if (preg_match('/_id$/', $fieldName))
        {
            $filter .= $this->filterSelect($fieldName, $options);
        }
        else
        {
            switch ($internalType)
            {
                case 'datetime':
                    $filter .= $this->filterDatetime($fieldName, $options);
                    break;

                case 'date':
                    $filter .= $this->filterDate($fieldName, $options);
                    break;

                case 'integer':
                case 'tinyinteger':
                case 'smallinteger':
                case 'biginteger':
                    $filter .= $this->filterInteger($fieldName, $options);
                    break;

                case 'float':
                case 'decimal':
                    $filter .= $this->filterFloat($fieldName, $options);
                    break;

                case 'boolean':
                    $filter .= $this->filterBoolean($fieldName, $options);
                    break;

                default:
                    $filter .= $this->filterText($fieldName, $options);
                    break;
            }
        }

        return $filter;
    }
239655
public function addFilterMultiSelect($key, $name, array $options, $column = null)
	{
		$column = $column ?: $key;

		if (!is_string($column)) {
			throw new DataGridException('Filter MultiSelect can only filter in one column.');
		}

		$this->addFilterCheck($key);

		return $this->filters[$key] = new Filter\FilterMultiSelect($this, $key, $name, $options, $column);
	}
1155480
public function addIndex($columnName, $type = Table::INDEX_REGULAR) {
        if (!array_key_exists($columnName, $this->getIndexes()) && !array_key_exists($columnName,
                        $this->newIndexes))
                $this->newIndexes[$columnName] = $type;
        return $this;
    }
945023
public function changeColumn($columnName, array $options)
    {
        $column = $this->getColumn($columnName);
        $column->setOptions($options);

        return $this;
    }
442619
public function setFilterSelectAjax(
        string $field,
        array $array,
        array $selected,
        string $url,
        string $class = '',
        string $style = '',
        string $placeholder = ''
    ): ColumnInterface {
        return $this->setFilter($field, $array, self::FILTER_TYPE_SELECT_AJAX, $selected, $class, $style, $placeholder, $url);
    }
614726
public function column($name, $type = null, $options = [])
    {
        return $this->addColumn($name, $type, $options);
    }