Run the query.

@return builder
11612
private function query()
    {
        foreach ($this->search_models as $model_name => $filters) {
            // Apply search against the original model.
            if ($model_name === 'self') {
                self::applySearch($this->query, $filters);
                continue;
            }

            // Apply search against the related model.
            $this->query->whereHas($model_name, function ($query) use ($filters) {
                self::applySearch($query, $filters);
            });
        }

        return $this->query;
    }
1218579
public function run()
    {
        $this->blueprints = Env::instance()->blueprints();
        $this->blueprints
            ->add($this->makeFilterBlueprint())
            ->add($this->makeFieldBlueprint())
            ->add($this->makeComponentBlueprint())
            ->add($config_blueprint = $this->makeConfigBlueprint());
        return new Builder($config_blueprint);
    }
503220
public function query() : Builder
	{
		if (! is_null($this->min) && ! is_null($this->max)) {
			$this->builder->whereBetween('price', [$this->min, $this->max]);
		}

		if (! is_null($this->min) && is_null($this->max)) {
			$this->builder->where('price', '>=', $this->min);
		}

		if (is_null($this->min) && ! is_null($this->max)) {
			$this->builder->where('price', '<=', $this->max);
		}

		return $this->builder;
	}
1215267
public function run()
	{
		$this->resultset = $this->connection->select($this->query);
		$this->numFound = $this->resultset->getNumFound();
		$this->results = $this->getResults();
		$this->resultsFacetSet = $this->resultset->getFacetSet();
		return $this;
	}
633600
protected function newBaseQueryBuilder()
    {
        $connection = $this->getConnection();
        // Check the connection type
        if ($connection instanceof \duxet\Rethinkdb\Connection) {
            return new QueryBuilder($connection);
        }

        return parent::newBaseQueryBuilder();
    }
584727
public function run()
    {
        if(Schema::hasTable(strtolower($this->model)))
        {
            $tableName = strtolower($this->model);
        }elseif(Schema::hasTable(strtolower($this->model)."s")) {
            $tableName = strtolower($this->model."s");
        }else{
            $tableName = "";
        }

        $tableColumns = $tableName != "" ? Schema::getColumnListing($tableName) : [];

        $module  = camel_case($this->module);
        $model   = camel_case($this->model);

        $templatePath = $this->customTemplate ?: __DIR__."/template/repository.blade.php";

        $paramColumns = array_diff($tableColumns, ["id", "created_at", "updated_at"]);

        $paramStrings = collect($paramColumns)->map(function($item){
            return "$".lcfirst(camel_case($item));
        })->toArray();

        $view =  View::file($templatePath, [
            "group"         => $this->group,
            "module"        => $module,
            "model"         => $model,
            "paramStrings"  => $paramStrings,
            "tableColumns"  => $paramColumns
        ]);

        $filePath = "Repositories/".ucfirst($model)."Repository.php";

        if(!is_dir(app_path("Repositories/")))
        {
            mkdir(app_path("Repositories/"));
        }

        if(!file_exists(app_path($filePath)))
        {
            file_put_contents(app_path($filePath), "<?php \n\n" . $view->render());
        }else{
            if($this->mode == "overwrite")
            {
                file_put_contents(app_path($filePath), "<?php \n\n" . $view->render());
            }
        }
    }
328813
public function run()
    {
        if ($this->fullQueryString() !== '') {
            $this->startQuery();
            // Fetching results can take a while. Increase our time limit.
            $maximumTime = 60;
            set_time_limit($maximumTime + 5);

            while (($this->queryIsRunning) && (time() - $this->queryStartTime < $maximumTime)) {
                sleep(2);
                if ($this->queryIsDone()) {
                    break;
                }
            }

            $this->fetchResults();
        }
    }
196321
public function run()
    {
        $request = $this->container->get(self::REQUEST);

        $response = $this->handle($request);

        return $this->emit($response)->stream();
    }
130538
public final function run()
    {
        $this->registerServices();
        $this->registerCommands();
        return $this->symfonyApplication->run($this->input, $this->output);
    }
550698
protected function _execute()
    {
        $this->triggerBeforeFind();
        if ($this->_results) {
            $decorator = $this->_decoratorClass();

            return new $decorator($this->_results);
        }

        $statement = $this->getEagerLoader()->loadExternal($this, $this->execute());

        return new ResultSet($this, $statement);
    }
1232140
public function query() : Builder
	{
		if (trim($conditions = $this->conditions) !== '') {
			$this->builder->where('condition', 'LIKE', $conditions);
		}

		return $this->builder;
	}
861885
public function run()
    {
        if ($this->fireEvent("OnBeforeRun")) {
            if ($this->dataSources != null) {
                foreach ($this->dataSources as $dataSource) {
                    if (!$dataSource->isEnded()) {
                        $dataSource->start();
                    }
                }
            }
        }
        $this->fireEvent("OnRunEnd");
        return $this;
    }
983543
public function getQueryBuilder() {
        $query = $this->query;

        if ($query instanceof \Illuminate\Database\Eloquent\Builder)
        {
            $query = $query->getQuery();
        }

        return $query;
    }
1119701
public function run()
    {
        $scanner = new Scanner();
        $scanner->run();

        $newDataProvider = $this->controller->createLanguageSourceDataProvider($scanner->getNewLanguageElements());
        $oldDataProvider = $this->_createLanguageSourceDataProvider($scanner->getRemovableLanguageSourceIds());

        return $this->controller->render('scan', [
            'newDataProvider' => $newDataProvider,
            'oldDataProvider' => $oldDataProvider,
        ]);
    }
36443
public function build()
    {
        return new QueryConfiguration(
            $this->drawCall,
            $this->start,
            $this->length,
            $this->searchValue,
            $this->searchRegex,
            $this->columSearches,
            $this->columnOrders
        );
    }
1243947
public function run()
    {
        $vendorDir = dirname(dirname(__FILE__));
        $baseDir = dirname($vendorDir);
        spl_autoload_register(function ($className) use($baseDir) {
            if (file_exists($file = $baseDir . '/database/seeds/' . $className . '.php')) {
                include($file);
                return true;
            }
        });

        $this->call([
            ModulesTableSeeder::class,
            PrivilegesTableSeeder::class,
            SettingsTableSeeder::class,
        ]);
    }
306360
public function run()
    {
        $this->controller->getSearchCriteria();
        $this->controller->dataProvider->pagination = false;
        $query = $this->controller->dataProvider->query;

        $config = new ExporterConfig();
        $exporter = new Exporter($config);
        $result = $query->asArray()->all();
        $fields = $this->fields;
        $values = array_map(function ($ar) use ($fields) {
        //$values = array_map(function () use ($fields) {
            $return = [];
            foreach($fields as $field) {
                $keyString = "['" . str_replace('.', "']['", $field) . "']"; 
                eval("\$return[] = \$ar".$keyString.";");
            }
            return $return;
        }, $result);
        if(isset($_GET['test'])) {
            return json_encode(array_merge([$this->fields], $values));
        } else {
            $this->setHttpHeaders('csv', $this->controller->getCompatibilityId(), 'text/plain');
            $exporter->export('php://output', array_merge([$this->fields], $values));
        }
    }