protected function hasQueryBuilderMethod(string $name) : bool
    {
        if (method_exists($this->queryBuilder, $name)) {
            return true;
        }

        if (method_exists($this->queryBuilder, 'hasMacro') && $this->queryBuilder->hasMacro($name)) {
            return true;
        }

        return false;
    }