Set the query where exists clause
@param      $name
@param bool $exists
@return $this
962105
public function whereExists($name, $exists = true)
    {

        if ($exists) {
            $this->must[] = ["exists" => ["field" => $name]];
        } else {
            $this->must_not[] = ["exists" => ["field" => $name]];
        }

        return $this;
    }
100096
public function exists($name)
    {
        $suffix = '.twig';
        $endsWithSuffix = strtolower(substr($name, -\strlen($suffix))) === $suffix;

        return !$endsWithSuffix;
    }
1324028
public function setQueryParameter($name, $value)
    {
        $this->query_array[$name] = $value;
        $this->query = http_build_query($this->query_array);
        return $this;
    }
1323476
public function setQueryParameter($name, $value)
    {
        $this->query[(string) $name] = (string) $value;

        return $this;
    }
255229
protected function setTimestampsOnAttach(array $record, $exists = false)
	{
		$fresh = $this->parent->freshTimestamp();

		if ( ! $exists) $record[$this->createdAt()] = $fresh;

		$record[$this->updatedAt()] = $fresh;

		return $record;
	}
711004
public function exists($name)
    {
        return ($this->basic->exists($name) || $this->dynamic->exists($name));
    }
159603
public function addQuery($name, $value)
    {
        $this->query = array_merge_recursive($this->query, [$name => $value]);
    }
309578
public function exists($name)
    {
        if (!$this->validateCmsObject($name)) {
            return parent::exists($name);
        }

        return $this->obj->exists;
    }
771507
public static function exists($query)
    {
        //
        static::applySchema();

        //
        $table = self::getTable();

        //
        $whereArray = [];

        //
        $valuesArray = [];

        //
        if (isset($query['where'])) {
            $whereArray[] = $query['where'];
            unset($query['where']);
        }

        //
        $schema = static::getSchemaFields();

        //
        foreach ($schema as $field) {
            if (isset($query[$field])) {
                $token = ':'.$field;
                $whereArray[] = "`{$field}` = {$token}";
                $valuesArray[$token] = $query[$field];
            }
        }

        $where = count($whereArray) > 0
               ? 'WHERE '.implode(' AND ', $whereArray)
               : '';

        $sql = "SELECT * FROM `{$table}` {$where} LIMIT 1";

        $row = static::getDatabase()->getRow($sql, $valuesArray);

        return $row ? self::create($row) : false;
    }
402986
public static function exists($name)
    {
        static::isOn(true);

        if (!isset(static::$register[$name])) {
            return false;
        } else {
            $item = static::$register[$name];

            return $item['lifetime'] > time() || $item['lifetime'] == 0;
        }
    }
333915
public function getSetting($name)
    {
        if ($this->hasName($name) === false) {
            throw NameDoesNotExist::named($name, $this->alias());
        }
        /** @var SettingRepository $repository */
        $repository = app(SettingRepository::class);
        $query = $repository->getNewQuery();
        $query = $this->makeQueryFiltered($query);
        $setting = $query->where('name', $name)->first();
        if (!$setting) {
            $defaultValue = $this->getDefault($name);
            $this->update($name, $defaultValue);
            $setting = $query->first();
        }
        return $setting;
    }
167594
def where_exists(self, query, boolean="and", negate=False):
        
        if isinstance(query, Builder):
            query = query.get_query()

        self.get_query().where_exists(query, boolean, negate)

        return self
481685
public static function dropDatabase($name, $ifExists = null)
    {
        $query = static::getQuery();

        return static::build(
            'DROP DATABASE',
            $ifExists ? 'IF EXISTS' : null,
            $query->quoteName($name)
        );
    }
1017293
public static function exists($name, $target = '')
    {
        if ($target === true) {
            return isset(static::$_matchers[$name]);
        }
        return isset(static::$_matchers[$name][$target]);
    }
961554
public static function existsAlready($name, Exception $cause = null)
    {
        return new static(sprintf(
            'An option named "%s%s" exists already.',
            strlen($name) > 1 ? '--' : '-',
            $name
        ), 0, $cause);
    }
169969
public function whereExistsRaw(string $sql, string ...$params)
    {
        $this->wConditions = null;

        $this->exists = [
            'sql'    => $sql,
            'negate' => false,
            'params' => $params,
        ];

        return $this;
    }
655463
public function addOptionalQueryParameter($name, $value)
    {
        Validate::isString($name, 'name');
        Validate::isString($value, 'value');

        if (!empty($value)) {
            $this->_queryParams[$name] = $value;
        }
    }