Sets or resets the order of the existing schemas in the current search path of the user.

This is a PostgreSQL only function.

@return void
513
public function determineExistingSchemaSearchPaths()
    {
        $names = $this->getSchemaNames();
        $paths = $this->getSchemaSearchPaths();

        $this->existingSchemaPaths = array_filter($paths, static function ($v) use ($names) {
            return in_array($v, $names);
        });
    }
263101
protected function clear()
    {
        $this->sql      = null;
        $this->start    = null;
        $this->from     = null;
        $this->join     = null;
        $this->set      = null;
        $this->where    = null;
        $this->groupby  = null;
        $this->orderby  = null;
        $this->limit    = null;
        $this->offset   = null;
    }
632958
public function reset() {
		$this->tables  = [];
		$this->columns = [];
		$this->where   = [];
		$this->offset  = null;
		$this->limit   = null;
		$this->orderBy = [];
		$this->groupBy = [];
		$this->joins   = [];
		$this->params  = [];

		return $this;
	}
762750
protected function resetRequest(): void
    {
        $request = Request::getInstance();

        // priority:
        //  - default values
        //  - from GET query
        //  - from path
        $request = $request->withQueryParams(
            array_merge(
                [
                    '_module' => $this->getDefaultModule(),
                    '_controller' => $this->getDefaultController()
                ],
                $request->getQueryParams(),
                $this->params
            )
        );
        Request::setInstance($request);
    }
1062821
public function resetAll()
    {
        $this->sphinx->ResetFilters();
        $this->sphinx->ResetGroupBy();
        $this->sphinx->ResetOverrides();
        $this->sphinx->SetSortMode(SPH_SORT_RELEVANCE);
        $this->resetLimits();
    }
506750
public function reset()
    {
        $this->values[self::ID] = null;
        $this->values[self::PUBLICKEY] = null;
        $this->values[self::PRIVATEKEY] = null;
        $this->values[self::SIGNATURE] = null;
        $this->values[self::TIMESTAMP] = null;
    }
68747
protected function setQuery()
    {
        $this->builder = $this->connection->createQueryBuilder();
        $this->builder->delete($this->connection->quoteIdentifier($this->model->table()));
    }
134036
public function recalculateSort()
    {
        $owner = $this->owner;
        $db = $this->owner->getDb();
        $builder = new QueryBuilder($db);

        $orderFields = [$this->sortAttribute => 'asc'];
        foreach ($owner->primaryKey() as $field) {
            if ($field != $this->sortAttribute) {
                $orderFields[$field] = 'asc';
            }
        }
        // recalculate sort
        $query = $builder->update(
            $owner->tableName(),
            [$this->sortAttribute => new Expression('(@sortingCount:=(@sortingCount+1))')],
            $this->getCondition(),
            $params
        ) . ' ' . $builder->buildOrderBy($orderFields);
        $db->createCommand('set @sortingCount=-1;' . $query, $params)->execute();
        // update in current record
        if (!$owner->getIsNewRecord()) {
            $owner->{$this->sortAttribute} = $owner->findOne($owner->getPrimaryKey())->{$this->sortAttribute};
        }
    }
402778
protected function resetStateBeforeIndexAction()
    {
        $this->activeSort           = null;
        $this->activeSortDescending = null;
        $this->activeScope          = null;
        $this->filters              = [];
        $this->activePage           = null;
        $this->activePageSize       = null;
        $this->resetActivePage      = false;

        return $this;
    }
93634
final public function updateSchema()
    {
        if (Configuration::DATA_MODE_WIPE === $mode = $this->configuration->getDataMode()) {
            $this->wipeData();
        }

        if (Configuration::SCHEMA_MODE_NONE !== $mode = $this->configuration->getSchemaMode()) {
        }
    }
1361539
protected function _setOrder()
    {
        $order = $this->_sql->getOrder();
        if (!(is_null($order) || empty($order))) {
            $this->_statement .= " ORDER BY {$order}";
        }
        return $this;
    }
912335
private function ensureOrderColumnExists()
    {
        $attributes = $this
            ->connection
            ->createQueryBuilder()
            ->select('metamodel.tableName', 'attribute.colname')
            ->from('tl_metamodel_attribute', 'attribute')
            ->leftJoin('attribute', 'tl_metamodel', 'metamodel', 'metamodel.id=attribute.pid')
            ->where('attribute.type=:type')
            ->setParameter('type', 'file')
            ->andWhere('attribute.file_multiple=:multiple')
            ->setParameter('multiple', '1')
            ->execute();

        while ($row = $attributes->fetch(\PDO::FETCH_OBJ)) {
            if ($this->fieldExists($row->colname . '__sort', $row->tableName)) {
                continue;
            }
            $this
                ->connection
                ->exec(
                    \sprintf(
                        'ALTER TABLE %1$s ADD COLUMN %2$s__sort %3$s',
                        $row->tableName,
                        $row->colname,
                        'blob NULL'
                    )
                );
        }
    }
811775
public function reset()
    {
        $this->values[self::ID] = null;
        $this->values[self::BASEKEY] = null;
        $this->values[self::RATCHETKEY] = null;
        $this->values[self::IDENTITYKEY] = null;
        $this->values[self::BASEKEYSIGNATURE] = null;
    }
374679
private function setOrderBy()
    {
        if (isset($this->requestParams['order']) && count($this->requestParams['order'])) {
            $counter = count($this->requestParams['order']);

            for ($i = 0; $i < $counter; ++$i) {
                $columnIdx = (integer) $this->requestParams['order'][$i]['column'];
                $requestColumn = $this->requestParams['columns'][$columnIdx];

                if ('true' == $requestColumn['orderable']) {
                    $this->qb->addOrderBy(
                        $this->orderColumns[$columnIdx],
                        $this->requestParams['order'][$i]['dir']
                    );
                }
            }
        }

        return $this;
    }
1366312
public function clear()
    {
        parent::clear();

        $this->with = array();
        $this->primaryCriteria = null;
        $this->formatter = null;
        $this->select = null;
        $this->modelAlias = $this->originalModelAlias;
        $this->currentAlias = null;
        $this->setDbName($this->originalDbName);
        $this->useAliasInSQL = false;
        $this->isKeepQuery = true;
        $this->previousJoin = null;
        $this->isWithOneToMany = false;
        $this->replacedColumns = array();
        $this->foundMatch = false;

        return $this;
    }
1350958
protected function updateOrderFieldOnRestore()
    {
        static::orderModel()
            ->where($this->getOrderField(), '>', $this->getOrderValue())
            ->increment($this->getOrderField());
    }
468509
public function init()
    {
        $this->errors = array();
        $this->schemaFile = realpath(__DIR__ . '/../../../../../') . DIRECTORY_SEPARATOR . self::DEFAULT_XML_SCHEMA;
        $this->schemaFiles = array();
    }