public static function appendWhere(QueryBuilder $queryBuilder, DataTablesWrapperInterface $dtWrapper) {

        $operator = static::determineOperator($dtWrapper);
        if (null === $operator) {
            return;
        }

        $wheres = [];
        $params = [];
        $values = [];

        foreach ($dtWrapper->getRequest()->getColumns() as $dtColumn) {

            if (true === $dtColumn->getSearchable() && ("OR" === $operator || "" !== $dtColumn->getSearch()->getValue())) {

                $wheres[] = DataTablesMappingHelper::getWhere($dtColumn->getMapping());
                $params[] = DataTablesMappingHelper::getParam($dtColumn->getMapping());
                $values[] = "%" . ("AND" === $operator ? $dtColumn->getSearch()->getValue() : $dtWrapper->getRequest()->getSearch()->getValue()) . "%";
            }
        }

        $queryBuilder->andWhere("(" . implode(" " . $operator . " ", $wheres) . ")");
        for ($i = count($params) - 1; 0 <= $i; --$i) {
            $queryBuilder->setParameter($params[$i], $values[$i]);
        }
    }