protected function _setEscaper()
    {
        if ($this->getConfig('escaper') === null) {
            $query = $this->getQuery();
            if (!$query instanceof Query) {
                throw new RuntimeException('$query must be instance of Cake\ORM\Query to be able to check driver name.');
            }
            $driver = get_class($query->getConnection()->getDriver());
            $driverName = 'Sqlserver';
            if (substr_compare($driver, $driverName, -strlen($driverName)) === 0) {
                $this->setConfig('escaper', 'Search.Sqlserver');
            } else {
                $this->setConfig('escaper', 'Search.Default');
            }
        }

        $class = $this->getConfig('escaper');
        $className = App::className($class, 'Model/Filter/Escaper', 'Escaper');
        if (!$className) {
            throw new InvalidArgumentException(sprintf(
                'Escape driver "%s" in like filter was not found.',
                $class
            ));
        }

        $this->_escaper = new $className($this->getConfig());
    }