Must return the DQL statement and set the proper parameters in the QueryBuilder

@param QueryBuilder $qb
@param string       $column
@param mixed        $data

@return string
171144
protected function applyDQL(QueryBuilder $qb, string $column, $data): string
    {
        $input = $data['input'];
        $uid = uniqid('text', false); // Generate random parameter names to prevent collisions
        switch ($data['option']) {
            case 'exact':
                $qb->setParameter($uid, $input);

                return "{$column} = :{$uid}";
            case 'like_':
                $qb->setParameter($uid, trim($input, '%').'%');

                return "{$column} LIKE :{$uid}";
            case '_like':
                $qb->setParameter($uid, '%'.trim($input, '%'));

                return "{$column} LIKE :{$uid}";
            case '_like_':
                $qb->setParameter($uid, '%'.trim($input, '%').'%');

                return "{$column} LIKE :{$uid}";
            case 'notlike_':
                $qb->setParameter($uid, trim($input, '%').'%');

                return "{$column} NOT LIKE :{$uid}";
            case '_notlike':
                $qb->setParameter($uid, '%'.trim($input, '%'));

                return "{$column} NOT LIKE :{$uid}";
            case '_notlike_':
                $qb->setParameter($uid, '%'.trim($input, '%').'%');

                return "{$column} NOT LIKE :{$uid}";
            case 'empty':
                return "{$column} = ''";
            case 'notempty':
                return "{$column} != ''";
            case 'null':
                return "{$column} IS NULL";
            case 'notnull':
                return "{$column} IS NOT NULL";
        }
        throw new \UnexpectedValueException("Unknown option '{$data['option']}'");
    }
1368776
public function getFilter(QueryBuilder $qb, $dqlAlias)
    {
        return (string) $qb->expr()->not($this->child->getFilter($qb, $dqlAlias));
    }
1307047
public function transform(QueryBuilder $qb, $dqlAlias)
    {
        if ($this->expression instanceof Filter) {
            $expression = $this->expression->getFilter($qb, $dqlAlias);
        } else {
            $expression = ArgumentToOperandConverter::toField($this->expression);
            $expression = $expression->transform($qb, $dqlAlias);
        }

        return sprintf($this->getAliasFormat(), $expression, $this->alias);
    }
1059906
private function buildRequireArrayQuery($subclause, Builder $query)
    {
        if ($subclause['operator'] == 'IN') {
            $query->whereIn($subclause['to_value_column'], $subclause['value']);
        } elseif ($subclause['operator'] == 'NOT IN') {
            $query->whereNotIn($subclause['to_value_column'], $subclause['value']);
        } elseif ($subclause['operator'] == 'BETWEEN') {
            if (count($subclause['value']) !== 2) {
                throw new QBParseException($subclause['to_value_column'].
                    ' should be an array with only two items.');
            }

            $query->whereBetween($subclause['to_value_column'], $subclause['value']);
        } elseif ($subclause['operator'] == 'NOT BETWEEN') {
            if (count($subclause['value']) !== 2) {
                throw new QBParseException($subclause['to_value_column'].
                    ' should be an array with only two items.');
            }

            $query->whereNotBetween($subclause['to_value_column'], $subclause['value']);
        }

        return $query;
    }
44267
public function queryValue(string $sql, string $column, $default = null)
    {
        $result = $default;
        if ($row = $this->query($sql)->fetch(PDO::FETCH_ASSOC)) {
            $result = $row[$column];
        }

        return $result;
    }
621482
public function getFilter(QueryBuilder $qb, $dqlAlias)
    {
        $spec = $this->getSpec();
        if ($spec instanceof Filter) {
            return $spec->getFilter($qb, $this->getAlias($dqlAlias));
        }

        return;
    }
788534
public function getRow(QueryBuilder $qb, array $params = [], $inDeleted = false)
    {
        if ($this->softDelete && !$inDeleted) {
            $qb->andWhere('t.'.$this->softDeleteName.' IS NULL');
        }

        return $this->db->fetchAssoc($qb->getSQL(), $params);
    }
1279984
protected function applyAttributeQueryBuilder(
        AttributeQueryBuilderInterface $attributeQb,
        $data
    ): AttributeQueryBuilderInterface {
        $input = $data['input'];
        switch ($data['option']) {
            case 'exact':
                return $attributeQb->equals($input);
            case 'greaterthan':
                return $attributeQb->gt($input);
            case 'lowerthan':
                return $attributeQb->lt($input);
            case 'greaterthanequals':
                return $attributeQb->gte($input);
            case 'lowerthanequals':
                return $attributeQb->lte($input);
            case 'empty':
                return $attributeQb->equals('');
            case 'notempty':
                return $attributeQb->notEquals('');
            case 'null':
                return $attributeQb->isNull();
            case 'notnull':
                return $attributeQb->isNotNull();
        }
        throw new \UnexpectedValueException("Unknown option '{$data['option']}'");
    }
343317
public function whereIsNull(string $column)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->whereIsNull($column);

        return $instance;
    }
1141130
public function queryColumn($sql = null,$params = array())
	{
		if(!isset($this->operationOption['params']))
		{
			$this->operationOption['params'] = array();
		}
		$this->prepareQuery($sql ? $sql : $this->buildSelectSQL(),$params);
		if(false === $this->lastStmt)
		{
			return false;
		}
		else
		{
			return $this->lastStmt->fetchAll(PDO::FETCH_COLUMN);
		}
	}
842611
protected function setTableAlias(QueryBuilder $qb, $tableName)
    {
        $this->_tableAlias = $qb->makeAliasKey($tableName);

        return $this;
    }
520345
public function whereIn($column, array $range, $boolean = 'and')
    {
        if (count($range) == 0) {
            throw new QueryBuilderException(
                'Parameter 2 must be contains two values',
                E_ERROR
            );
        }

        $map = array_map(function () {
            return '?';
        }, $range);

        $this->where_data_binding = array_merge($range, $this->where_data_binding);

        $in = implode(', ', $map);

        if (is_null($this->where)) {
            if ($boolean == 'not') {
                $this->where = '(`' . $column . '` not in ('.$in.'))';
            } else {
                $this->where = '(`' . $column .'` in ('.$in.'))';
            }
        } else {
            if ($boolean == 'not') {
                $this->where .= ' and (`' . $column . '` not in ('.$in.'))';
            } else {
                $this->where .= ' and (`'.$column.'` in ('.$in.'))';
            }
        }

        return $this;
    }
678645
private function setWhere(QueryBuilder $qb)
    {
        $globalSearch = $this->requestParams['search']['value'];

        // global filtering
        if ('' != $globalSearch) {
            $orExpr = $qb->expr()->orX();

            foreach ($this->columns as $key => $column) {
                if (true === $this->isSearchColumn($column)) {
                    $searchField = $this->searchColumns[$key];
                    $orExpr->add($qb->expr()->like($searchField, '?'.$key));
                    $qb->setParameter($key, '%'.$globalSearch.'%');
                }
            }

            $qb->where($orExpr);
        }

        // individual filtering
        if (true === $this->individualFiltering) {
            $andExpr = $qb->expr()->andX();

            $i = 100;

            foreach ($this->columns as $key => $column) {
                if (true === $this->isSearchColumn($column)) {
                    $searchType = $column->getSearchType();
                    $searchField = $this->searchColumns[$key];
                    $searchValue = $this->requestParams['columns'][$key]['search']['value'];
                    $searchRange = $this->requestParams['columns'][$key]['name'] === 'daterange';
                    if ('' != $searchValue && 'null' != $searchValue) {
                        if ($searchRange) {
                            list($_dateStart, $_dateEnd) = explode(' - ', $searchValue);
                            $dateStart = new \DateTime($_dateStart);
                            $dateEnd = new \DateTime($_dateEnd);
                            $dateEnd->setTime(23, 59, 59);

                            $k = $i + 1;
                            $andExpr->add($qb->expr()->between($searchField, '?'.$i, '?'.$k));
                            $qb->setParameter($i, $dateStart->format('Y-m-d H:i:s'));
                            $qb->setParameter($k, $dateEnd->format('Y-m-d H:i:s'));
                            $i += 2;
                        } else {
                            $andExpr = $this->addCondition($andExpr, $qb, $searchType, $searchField, $searchValue, $i);
                            ++$i;
                        }
                    }
                }
            }

            if ($andExpr->count() > 0) {
                $qb->andWhere($andExpr);
            }
        }

        return $this;
    }
418184
public function applyExprFromArray($qb, $alias, array $criteria)
	{
		$pos = 0;
		
		foreach ($criteria as $field => $exprValue) {
			$this->applyExprFromString($qb, $alias, $field, $exprValue, ':'.$field.($pos++));
		}
	}
364476
public function transform(QueryBuilder $qb, $dqlAlias)
    {
        if (!in_array(strtolower($this->functionName), self::$doctrineFunctions) &&
            !$qb->getEntityManager()->getConfiguration()->getCustomStringFunction($this->functionName) &&
            !$qb->getEntityManager()->getConfiguration()->getCustomNumericFunction($this->functionName) &&
            !$qb->getEntityManager()->getConfiguration()->getCustomDatetimeFunction($this->functionName)
        ) {
            throw new InvalidArgumentException(sprintf('"%s" is not a valid function name.', $this->functionName));
        }

        $arguments = ArgumentToOperandConverter::convert($this->arguments);
        foreach ($arguments as $key => $argument) {
            $arguments[$key] = $argument->transform($qb, $dqlAlias);
        }

        return sprintf('%s(%s)', $this->functionName, implode(', ', $arguments));
    }
68848
protected function applyAttributeQueryBuilder(
        AttributeQueryBuilderInterface $attributeQb,
        $data
    ): AttributeQueryBuilderInterface {
        if (\is_array($data)) {
            return $attributeQb->in($data);
        }

        return $attributeQb->equals($data);
    }
286891
public function transform(QueryBuilder $qb, $dqlAlias)
    {
        $field = ArgumentToOperandConverter::toField($this->field);

        $field = $field->transform($qb, $dqlAlias);

        return sprintf('(~ %s)', $field);
    }