Refresh query builder
@return $this
977954
public function newQuery()
    {
        $this->orderBys = [];
        $this->limit = null;
        $this->offset = null;

        return $this->freshQueryBuilder();
    }
1194273
public function reload()
    {
        $freshObject = static::find($this->id());
        $this->getAttributes()->dirty()->resetChanges();
        $this->getAttributes()->setRaw($freshObject->attributes());
        return $this;
    }
757056
public function refresh()
    {
        $default = true;
        $filter  = array();

        if ($this->patientId) {
            $filter['gr2o_patient_nr'] = $this->patientId;
            $default = false;
        } elseif ($this->respondentId) {
            $filter['gr2o_id_user'] = $this->respondentId;
            $default = false;
        }
        if (! $filter) {
            // Otherwise we load the first patient in the current organization
            $filter[] = '1=0';
        }
        if ($this->organizationId) {
            $filter['gr2o_id_organization'] = $this->organizationId;
        }

        $this->_gemsData = $this->model->loadFirst($filter);

        if ($this->_gemsData) {
            $this->exists = true;

            $this->patientId      = $this->_gemsData['gr2o_patient_nr'];
            $this->organizationId = $this->_gemsData['gr2o_id_organization'];
            $this->respondentId   = $this->_gemsData['gr2o_id_user'];
        } else {
            $this->_gemsData = $this->model->loadNew();
            $this->exists = false;
        }

        if ($this->currentUser instanceof \Gems_User_User) {
            $this->_gemsData = $this->currentUser->applyGroupMask($this->_gemsData);
        }
	}
847041
public function resetQuery()
    {
        $this->_field_list = array(self::DEFAULT_FIELD);
        $this->_param_list = array();
        $this->_limit      = array(self::DEFAULT_LIMIT);
        $this->_where_list = array();

        return $this;
    }
94470
public function refresh() {

		$directory = new Directory($this -> directory -> getPath());
		$this -> directory = $directory -> entity();

		return $this;
	}
1103225
protected function getUpdateQuery()
    {
        $primaryKey = $this->getDescriptor()->getPrimaryKey()->getName();
        $table = $this->getDescriptor()->getTableName();
        $sql = Sql::createSql($this->getAdapter());
        $query = (null === $this->entity->{$primaryKey})
            ? $sql->insert($table)
            : $this->setUpdateCriteria(
                $sql->update($table),
                $primaryKey,
                $table
            );
        return $query;
    }
154699
public function buildQuery()
    {
        $this->setSelectFrom();
        $this->setLeftJoins($this->qb);
        $this->setWhere($this->qb);
        $this->setWhereResultCallback($this->qb);
        $this->setWhereAllCallback($this->qb);
        $this->setOrderBy();
        $this->setLimit();

        return $this;
    }
929307
public function refresh(array $params = [])
    {
        return $this->client->indices()->refresh(array_merge(['index' => $this->getIndexName()], $params));
    }
911030
public function newRawQuery()
    {
        $builder = $this->newEloquentBuilder($this->newBaseQueryBuilder());

        // Once we have the query builders, we will set the model instances
        // so the builder can easily access any information it may need
        // from the model while it is constructing and executing various
        // queries against it.
        $builder->setModel($this)->with($this->with);
        return $builder;
    }
705294
public function query()
    {
        $this->applyCriteria();

        if ($this->model instanceof Model) {
            return $this->model->query();
        }

        return clone $this->model;
    }
287322
protected function refreshContainer()
    {
        $container = $this->getContainer();

        $this->add(function ($request, $response, $next) use ($container) {
            $container['request']  = $request;
            $container['response'] = $response;

            return $next($request, $response);
        });
    }
780466
public function refresh($refresh = true)
    {
        $this->unitOfWorkHints[Query::HINT_REFRESH] = (boolean) $refresh;
        return $this;
    }
373401
public function reload()
    {
        $fresh = \Pheasant::instance()->finderFor($this)
            ->find($this->className(), $this->identity()->toCriteria())
            ->one()
            ;

        $this->_data = $fresh->_data;

        return $this;
    }
986206
public function refresh()
    {
        /* @var $cache Cache */
        $cache = is_string($this->db->schemaCache) ? Yii::$app->get($this->db->schemaCache, false) : $this->db->schemaCache;
        if ($this->db->enableSchemaCache && $cache instanceof Cache) {
            TagDependency::invalidate($cache, $this->getCacheTag());
        }
        $this->_indexNames = [];
        $this->_indexes = [];
    }
1211959
public function reset()
    {
        $this->builder->resetQueryParts();
        $this->relations = [];
        $this->resetBinds();

        $this->setQuery();
        $this->values();
        $this->setPrimaryKeyConditions();

        return $this;
    }
1243265
public function Refresh() {
      $LocalName = $this->Current();
      
      $ApplicationWhiteList = Gdn::ApplicationManager()->EnabledApplicationFolders();
      $PluginWhiteList = Gdn::PluginManager()->EnabledPluginFolders();

      $ForceRemapping = TRUE;

      $this->Set($LocalName, $ApplicationWhiteList, $PluginWhiteList, $ForceRemapping);
   }
607709
public function refresh() {
        $outdated = [];
        foreach ($this->cache as $uri => $i) {
            try {
                $i->getMetadata(true);
            } catch (NotFound $e) {
                $outdated[] = $uri;
            } catch (Deleted $e) {
                $outdated[] = $uri;
            }
        }
        foreach ($outdated as $uri) {
            unset($this->cache[$uri]);
            foreach ($this->uri2id[$uri] as $id) {
                unset($this->id2uri[$id]);
            }
            unset($this->uri2id[$uri]);
        }
    }