@param string $conditions
@param array  $params
@param bool   $indexName
@param bool   $isConsistentRead
@param bool   $isAscendingOrder
@param int    $parallel

@return \SplDoublyLinkedList
504248
public function scanAll($conditions = '',
                            array $params = [],
                            $indexName = DynamoDbIndex::PRIMARY_INDEX,
                            $isConsistentRead = false,
                            $isAscendingOrder = true,
                            $parallel = 1)
    {
        $ret = new \SplDoublyLinkedList();
        $this->scanAndRun(
            function ($item) use ($ret) {
                $ret->push($item);
            },
            $conditions,
            $params,
            $indexName,
            $isConsistentRead,
            $isAscendingOrder,
            $parallel
        );
        
        return $ret;
    }
746955
public function addConditionsFromArray(array $conditions)
    {
        foreach ($conditions as $condition) {

            if (!is_callable($condition)) {

                $message = "One or more of the conditions you provided are not callable, ";
                $message .= "please pass an array of callable functions.";

                throw new \InvalidArgumentException($message);
            }

            $this->conditions->enqueue($condition);

        }
    }
155779
public static function formatConditions($methondname, $conditions)
    {
        if (count($conditions) > 1) {
            throw new InvalidArgumentException(
                sprintf("Method '%s' supports a single array input", $methondname)
            );
        }

        if (1 == count($conditions)) {
            if ($conditions[0] instanceof Node) {
                return $conditions;
            }
        }

        $conditions = (empty($conditions)) ? [[]] : $conditions;

        return call_user_func_array('array_merge', $conditions);
    }
109702
public function search($params)
    {
        $query = Pkk5kadastr::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
        ]);

        $query->andFilterWhere(['like', 'kadastrnumber', $this->kadastrnumber])
            ->andFilterWhere(['like', 'address', $this->address])
            ->andFilterWhere(['like', 'cost', $this->cost])
            ->andFilterWhere(['like', 'area', $this->area]);

        return $dataProvider;
    }
401957
public static function deleteAllAsync($condition = null, $params = [])
    {
        Yii::$app->queue->push(new DeleteAllActiveRecordJob([
            'modelClass' => get_called_class(),
            'condition' => $condition,
            'params' => $params
        ]));
    }
1260107
public function findBy(array $conditions)
    {
        $s = $this->selector();
        foreach ($conditions as $column => $value) {
            $s->where($column, '=', $value);
        }

        return $s->execute();
    }
1187496
public static function orderBy($params) {
        $orderCriterias = array_flip($params['args'][0]);
        $ormObject = !is_null($params['ormObject']) ? $params['ormObject'] : ORM::for_table($params['table']);
        
        foreach ($orderCriterias as $direction => $column) {
            if(strtolower($direction) == 'asc') {
                $ormObject->order_by_asc($column);
            } elseif(strtolower($direction) == 'desc') {
                $ormObject->order_by_desc($column);
            }
        }
        return $ormObject;
    }
914345
public function findOne($conditions, $params = array()){
        $row = $this->db->builder()->select()->from($this->table)->where($conditions, $params)->limit(1)->queryRow();
        if(false === $row){
            return false;
        }
        
        return $this->map($row);
    }
329693
public function where(array $condition = null): Select
    {
        if (!\is_array($condition)) {
            throw new InvalidArgumentException('$condition has to be an array');
        }
        $this->where = (new Condition($this->namesClass->getAliases()))->parse($condition);

        return $this;
    }
347331
protected function arrayToConditions($conditions)
    {
        $ret = [];

        foreach ($conditions as $key => $value) {
            if ($value instanceof Condition) {
                $ret[] = $value;
                continue;
            }

            $propertyOperator = explode('-', $key);

            if (in_array(count($propertyOperator), [1, 2])) {
                $ret[] = new Condition($propertyOperator[0], $value, $propertyOperator[1] ?? null);
            }
        }

        return $ret;
    }
667159
public function search($params)
    {
        $query = ServiceRelation::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'service1_id' => $this->service1_id,
            'item1_id' => $this->item1_id,
            'service2_id' => $this->service2_id,
            'item2_id' => $this->item2_id,
            'relation_type' => $this->relation_type,
            'sort_order' => $this->sort_order,
            'status' => $this->status,
            'update_time' => $this->update_time,
            'creation_time' => $this->creation_time,
        ]);

        return $dataProvider;
    }
1011526
public function where($conditions, $values=null) {
		if(!$conditions)
			return $this;
		if($values !== null)
			$this->where[] = [$conditions => $values];
		else
			$this->where[] = $conditions;

		return $this;
	}
1075859
public function createIndex($bucketName, $indexName, $columns, $condition = null, &$params = [], $options = [])
    {
        return $this->createCommand()->createIndex($bucketName, $indexName, $columns, $condition, $params, $options)->execute();
    }
1069694
public function having($conditions, ...$parameters)
    {
        if (is_array($conditions)) {
            $this->having = array_merge($this->where, array_map(function ($value, $field) {
                return $field . '=' . $this->connection->quote($value);
            }, $conditions, array_keys($conditions)));
        } else {
            if ($parameters) {
                $conditions = $this->connection->merge($conditions, $parameters);
            }
            $this->having[] = $conditions;
        }

        return $this;
    }
42835
private function _initCriteriaSortations( MW_Common_Criteria_Interface $criteria, stdClass $params )
	{
		if( isset( $params->sort ) && isset( $params->dir ) )
		{
			$sortation = array();

			switch( $params->dir )
			{
				case 'ASC':
					$sortation[] = $criteria->sort( '+', $params->sort ); break;
				case 'DESC':
					$sortation[] = $criteria->sort( '-', $params->sort ); break;
				default:
					throw new Controller_ExtJS_Exception( sprintf( 'Invalid sort direction "%1$s"', $params->sort ) );
			}

			$criteria->setSortations( $sortation );
		}


		if( $this->_sort !== null )
		{
			$sort = $criteria->getSortations();
			$sort[] = $criteria->sort( '+', $this->_sort );
			$criteria->setSortations( $sort );
		}
	}
630551
public static function multisort($array, $conditions, $ignore_case = false)
	{
		$temp = array();
		$keys = array_keys($conditions);

		foreach($keys as $key)
		{
			$temp[$key] = static::pluck($array, $key, true);
			is_array($conditions[$key]) or $conditions[$key] = array($conditions[$key]);
		}

		$args = array();
		foreach ($keys as $key)
		{
			$args[] = $ignore_case ? array_map('strtolower', $temp[$key]) : $temp[$key];
			foreach($conditions[$key] as $flag)
			{
				$args[] = $flag;
			}
		}

		$args[] = &$array;

		call_fuel_func_array('array_multisort', $args);
		return $array;
	}
107649
public function findMany($conditions = '', $params = array(), $orderBy = null, $limit = null, $offset = null){
        $cmd = $this->db->builder()->select()->from($this->table)->where($conditions, $params);
        if($orderBy){
            $cmd->orderBy($orderBy);
        }
        $rows = $cmd->limit($limit, $offset)->queryAll();
        if(false === $rows){
            return false;
        }
        else{
            return $this->mapModels($rows);
        }
    }