批量删除
@param string ...$conditions
@return void
184191
public static function deleteBatch(...$conditions)
    {
        $keys = [];
        foreach($conditions as $condition)
        {
            $keys[] = static::generateKey($condition);
        }
        static::__getRedis()->del(...$keys);
    }
1125943
public function delete($t, $conditions = array()){
		if(is_array($t)){
			$conditions = $t;
		}elseif(is_string($t)){
			$this->table($t);
		}
		if(!empty($conditions)){
			$this->where($conditions);
		}
		$this->_sql = $this->getDeleteStatement();
		return $this;
	}
695671
public function update($values, $conditions, $params = array()){
        return $this->db->builder()->update($this->table, $values, $conditions, $params);
    }
144201
public function autoNullConditionsArray(array $conditions) {
		foreach ($conditions as $k => $v) {
			if ($v !== null) {
				continue;
			}

			$conditions[$k . ' IS'] = $v;
			unset($conditions[$k]);
		}

		return $conditions;
	}
950299
public function removeCondition(\Sulu\Bundle\ResourceBundle\Entity\Condition $conditions)
    {
        $this->conditions->removeElement($conditions);
    }
484391
public function where($condition)
    {
        $this->where = ! $this->where ? $condition : $this->where . ' AND ' . $condition;

        return $this;
    }
498857
public function addConditions(array $conditions)
    {
        foreach ($conditions as $condition) {
            call_user_func_array([$this, key($condition)], current($condition));
        }

        return $this;
    }
1303004
protected function addConditions($query, $conditions)
    {
        foreach ($conditions as $key => $value) {
            if ($value instanceof Closure) {
                $query->where(function ($query) use ($value) {
                    $value($query);
                });
            } else {
                $this->addWhere($query, $key, $value);
            }
        }

        return $query;
    }
783966
public function get($conditions)
    {
        $query = $this->db->getQuery(true);

        $query->select('*')
            ->from($query->quoteName($this->table))
            ->where('id = :id')
            ->bind('id', $conditions);

        return $this->db->setQuery($query)->loadOne('assoc');
    }
1011526
public function where($conditions, $values=null) {
		if(!$conditions)
			return $this;
		if($values !== null)
			$this->where[] = [$conditions => $values];
		else
			$this->where[] = $conditions;

		return $this;
	}
680262
public function loginBy($conditions, $data = [])
    {
        $user = wei()->user()->findOrCreate($conditions, $data);
        $this->loginByRecord($user);

        return $this;
    }
868
public function setConditions(array $conditions = [])
    {
        $config = $this->container->has('config') ? $this->container->make('config') : null;

        if (! is_null($config)) {
            $this->conditions = array_merge(
                $config->get('app.conditions', []),
                $conditions
            );
        } else {
            $this->conditions = $conditions;
        }
    }
274005
public function orWhere(...$conditions) : self
    {
        $this->conditionalQueryBuilder->orWhere(
            ...$this->createConditionExpressions($conditions)
        );

        return $this;
    }
1364581
public function Where($condition, $values) {
        $this->setWhere($condition);
        $this->addBindValues($values);
        return $this;
    }
1246210
private function incrementPositions(array $conditions, ?int $startPosition = null, ?int $endPosition = null): void
    {
        $columnName = $conditions['column'];

        $query = $this->connection->createQueryBuilder();

        $query
            ->update($conditions['table'])
            ->set($columnName, $columnName . ' + 1');

        if ($startPosition !== null) {
            $query->andWhere($query->expr()->gte($columnName, ':start_position'));
            $query->setParameter('start_position', $startPosition, Type::INTEGER);
        }

        if ($endPosition !== null) {
            $query->andWhere($query->expr()->lte($columnName, ':end_position'));
            $query->setParameter('end_position', $endPosition, Type::INTEGER);
        }

        $this->applyConditions($query, $conditions['conditions']);

        $query->execute();
    }
1052150
protected function handleJoinConditions(array $conditions)
    {
        if (empty($conditions)) {
            return '';
        }
        $sql[] = $this->{$conditions[0]['type']}($conditions[0]);
        $count = count($conditions);
        for ($i = 1; $i < $count; $i++) {
            $sql[] = $conditions[$i]['separator'] . ' ' . $this->{$conditions[$i]['type']}($conditions[$i]);
        }
        return implode(' ', $sql);
    }
954785
public function isMatching(ConditionCollection $conditions)
    {
        $isMatching = true;
        /** @var ConditionInterface $condition */
        foreach ($conditions as $condition) {
            if (!$condition->isMatching()) {
                return false;
            }
        }

        return $isMatching;
    }