Query images for the given series ID.

E.g.: $query = [
'keyType' => 'fanart',
'resolution' => '1920x1080',
'subKey' => 'graphical'
]

@param int   $id    The series id.
@param array $query The query parameters.

@return array A list of found images
430176
public function getImagesWithQuery(int $id, array $query): array
    {
        $json = $this->parent->performAPICallWithJsonResponse(
            'get',
            '/series/'.$id.'/images/query',
            ['query' => $query]
        );

        return DataParser::parseDataArray($json, Image::class);
    }
1235017
public function PersonPictures(int $id): array
    {
        return $this->myanimelist->getPersonPictures(
            new Request\Person\PersonPicturesRequest($id)
        );
    }
295061
protected function convertQuery($query)
    {
        if (is_array($query)) {
            return array_map(function ($value) {
                if ($value instanceof Model) {
                    return $value->pk;
                } elseif ($value instanceof Manager || $value instanceof QuerySet) {
                    return $value->getQueryBuilder();
                }

                return $value;
            }, $query);
        } else {
            return $query;
        }
    }
716006
protected function queryFilters($query, $filters = [])
    {
        $filters = $filters ?: $this->filters;

        foreach ($filters as $key => $filter) {
            foreach ($filter as $operator => $values) {
                $values = is_array($values) ? $values : [$values];

                $operator = is_numeric($operator) ? '=' : $operator;

                if ($operator == '=') {
                    $query->whereIn($key, $values);
                } elseif ($operator == '!=') {
                    $query->whereNotIn($key, $values);
                } elseif ($operator == 'null') {
                    $query->whereNull($key);
                } elseif ($operator == 'not_null') {
                    $query->whereNotNull($key);
                } else {
                    $query->where($key, $operator, head($values));
                }
            }
        }

        return $query;
    }
652589
public static function find(array $query)
    {
        $employees = Client::get("employee", $query);
        return array_map(function ($data) { return new self($data); }, $employees);
    }
1189720
public function query($query=null, $params = [])
    {
        $result = false;
        $result_key = [];
        
        if ($query && static::isSql($query)) {
            $sql = $query;
        } else {
            $result_key = $this->getQuery()->set($query)->get('result_key');
            
            $queryType = $this->getQuery()->type();
            
            // limit select count
            if ((!$queryType || $queryType === 'select') 
                && !isset($this->getQuery()['count']) 
                && !isset($this->getQuery()['limit'])
                && !isset($this->getQuery()['pagesize'])) 
            {
                $this->getQuery()->set('limit', 1000);
            }
            
            // update must set where
            if (($queryType === 'update' || $queryType === 'delete') && !$this->getQuery()->get('where')) {
                Ioc::logger('db')->error('query no set where: ' . json_encode($this->getQuery()->all()));
                return false;
            }
            
            $sql = $this->parse();
        }
        
        if ($params) {
            $this->bindParams($params);
        }
        
        $this->lastSql = $this->formatSql($sql);
        
        // sql log
        Ioc::logger('db')->debug($sql);
        
        try {
            $this->getAdapter()->prepare($sql);
            if (!empty($this->binds)) {
                $this->getAdapter()->bindParams($this->binds);
            }
            $bool = $this->getAdapter()->execute();
            
            if (!$bool) {
                throw new Exception($this->getAdapter()->getErrorMessage());
            }
        } catch (Exception $e) {
            
            $this->getAdapter()->rollback();
            throw new Exception('Excute sql error: ' . $e->getMessage() . ', sql:' . $sql);
        }
        
        $rawStatement = explode(" ", $sql);
        $statement = strtolower(trim($rawStatement[0]));
        
        if ($statement === 'show') {
            $result = $this->getAdapter()->fetchAll($fetchmode);
        } elseif ($statement === 'select') {
            $rkeys = $result_key ? StringHelper::toArray($result_key, ',\s') : null;
            
            while($rs = $this->getAdapter()->fetch()) {
                // 如果指定返回结果集的key，则按key重组数据
                if ($rkeys) {
                    if (count($rkeys) == 1) {
                        $rk1 = trim($rkeys[0]);
                        if (isset($rs[$rk1])) {
                            $result[$rs[$rk1]] = $rs;
                        } else {
                            $result[] = $rs;
                        }
                    } elseif (count($rkeys) == 2) {
                        $rk1 = trim($rkeys[0]);
                        $rk2 = trim($rkeys[1]);
                        if (!empty($rk2)) {
                            $result[$rs[$rk1]][$rs[$rk2]] = $rs;
                        } else {
                            $result[$rs[$rk1]][] = $rs;
                        }
                    }
                } else {
                    $result[] = $rs;
                }
            }
        } elseif ($statement === 'update' || $statement === 'delete') {
            $result = $this->getAdapter()->numberOfRows();
        } elseif ($statement === 'insert') {
            $result = $this->getAdapter()->lastId();
        } else {
            return null;
        }
        
        return $result;
    }
898674
public static function _queryToObjects ($query, $key = FALSE)
	{
		$query->execute ();
		return static::_arrayToObjects ($query->fetchAll (\PDO::FETCH_ASSOC), $key);
	}
596808
public function find($query)
    {
        $output = [];
        foreach (array_keys($this->items) as $key) {
            if (strpos($key, $query) !== false) {
                $output[$key] = $this->items[$key];
            }
        }

        return $output;
    }
150443
public function getAllAsArray($query = null)
    {
        return [
            'unchangedCount' => $this->getUnchangedCount($query),
            'changedCount' => $this->getChangedCount($query),
            'failedCount' => $this->getFailedCount($query),
            'nodesCount' => $this->getNodesCount($query),
            'nodesCountByOS' => $this->getNodesCountByOS($query),
            'nodesPercentageByOS' => $this->getNodesPercentageByOS($query),
            'osCount' => $this->getOSCount($query),
            'recentlyRebootedNodes' => $this->getRecentlyRebootedNodes($query),
        ];
    }
1062394
public function rawSelectById($id, Query $query = null, $join = 'all')
        {
            if (!$id) {
                return null;
            }

            if (!$query instanceof Query) {
                $query = new Query($this);
            }
            $query->where($this->id_column, $id);
            $query->setLimit(1);
            return $this->rawSelectOne($query, $join);
        }
1130835
protected function findWildcardEntry(ResourceRecord $query): array
    {
        $labels = explode('.', rtrim($query->getName(), '.'));
        $labels = array_reverse($labels);

        /** @var ResourceRecord[] $wildcards */
        $wildcards = [];
        $array = &$this->wildcardRecords;
        foreach ($labels as $label) {
            if (array_key_exists($label, $array)) {
                $array = &$array[$label];
                continue;
            }

            if (array_key_exists('*', $array)) {
                $wildcards = $array['*'][$query->getClass()][$query->getType()] ?? [];
            }
        }

        $answers = [];
        foreach ($wildcards as $wildcard) {
            $rr = clone $wildcard;
            $rr->setName($query->getName());
            $answers[] = $rr;
        }

        return $answers;
    }
39958
public function query(
        Query $query,
        array $parameters = []
    ): Result {
        $result = $this
            ->repository
            ->query($query, $parameters);

        return $this->applyTransformersToResult($result);
    }
25701
function getQueryArgs (ids) {
    // build query args
    var queryArgs = {
        allow: this.query.args.allow,
        session: this.query.session,
        where: {},
    }
    // set ids for query
    queryArgs.where[this.idColumn] = ids
    // if query is for list of ids set all flag
    if (Array.isArray(ids)) {
        queryArgs.all = true
    }
    // otherwise set limit 1
    else {
        queryArgs.limit = 1
    }
    // if query is for original id then set current flag
    if (this.isOriginalId) {
        queryArgs.current = true
    }
    // if custom query args are set then merge
    if (typeof this.queryArgs === 'object') {
        _.merge(queryArgs, this.queryArgs)
    }

    return queryArgs
}
705270
public function search($query)
    {
        $classes = $this->getClassMetadata();
        return $this->_sm->getUnitOfWork()->loadCollection($classes, $query);
    }
1160023
public function query($query, array $params = [])
    {
        if (!$this->nextQueryIsolationLevel) {
            return $this->retryQuery($query, $params);
        }

        [$oldLevel] = $this->setIsolationLevel($this->nextQueryIsolationLevel);
        $result = $this->retryQuery($query, $params);
        $this->setIsolationLevel($oldLevel);

        return $result;
    }
1005709
public static function getImages($id)
    {
        global $config;
        $events=self::getEvents($id);
        $img=new archiImage();
        foreach ($events as $event) {
            $params = array("select"=>"hi1.idImage, hi1.dateUpload, hi1.idHistoriqueImage", "idEvenement"=>$event["idEvenementAssocie"]);
            $res=$config->connexionBdd->requete($img->getImagesFromEvenement($params));
            while ($image=mysql_fetch_object($res)) {
                $return[] =$image;
            }
        }
        return $return;
    }
600373
public function search($query)
    {
        $this->validate($query);
        $client = $this->client->getClient();
        $result = array();
        // Change the match column name with the column name you want to search in it.
        $params = [
                'index' => $this->client->getIndex(),
                'type'  => $this->client->getType(),
                'body'  => [
                    'query' => [
                        'match' => [ $this->searchColumn => $query],
                    ],
                ],
            ];
        $query  = $client->search($params);
            
        return  $this->extractResult($query);
    }