Returns visited queries.

@param QueryInterface[] $queries

@return array
542526
private function visitQueries(array $queries)
    {
        $result = [];
        foreach ($queries as $query) {
            $result[] = $this->getInterpreter($query)->visit($query);
        }

        return $result;
    }
86522
public function all($filters = array())
	{
		$query = $this->connection->getQuery()
			->select('session_id')
			->select('client_id')
			->select('guest')
			->select('time')
			->select('data')
			->select('userid')
			->select('username')
			->select('ip')
			->from('#__session');

		$max = '';
		if (isset($filters['distinct']) && $filters['distinct'] == 1)
		{
			$query->select('MAX(time)', 'time');
		}

		if (isset($filters['guest']))
		{
			$query->whereEquals('guest', $filters['guest']);
		}

		if (isset($filters['client']))
		{
			if (!is_array($filters['client']))
			{
				$filters['client'] = array($filters['client']);
			}

			$query->whereIn('client_id', $filters['client']);
		}

		if (isset($filters['distinct']) && $filters['distinct'] == 1)
		{
			$query
				->group('session_id')
				->group('userid')
				->group('client_id');
		}

		$query->order('time', 'desc');

		$this->connection->setQuery($query->toString());
		return $this->connection->loadObjectList();
	}
643710
private function getSearchQuery()
    {
        $queries = [];

        foreach ($this->queryProviders as $queryProvider) {
            $queries[] = $queryProvider->getQuery();
        }

        return array_filter($queries);
    }
310900
public function query_vars( array $vars ){
        if( !empty($this->query_var) ){
            foreach( $this->query_var as $var ){
                if( false === array_search($var, $vars) ){
                    $vars[] = $var;
                }
            }
        }
        return $vars;
    }
595618
public function getAll(array $queryParams = [])
    {
        $response = $this->api->users()->getAll($queryParams);

        return new UsersResponse($response);
    }
931860
public function findRedirectsByDemand(): array
    {
        return $this->getQueryBuilderForDemand()
            ->setMaxResults($this->demand->getLimit())
            ->setFirstResult($this->demand->getOffset())
            ->execute()
            ->fetchAll();
    }
1024351
public function getList(array $query = [])
    {
        $list = $this->execute(self::HTTP_GET, self::DOMUSERP_API_PEDIDOVENDA . '/empresas');

        return $list;
    }
694263
public function lookup(array $queries = array())
    {
        try {
            $request  = $this->requestLookup($queries);
            $response = $this->getClient()->send($request);
        } catch(\Exception $ex) {
            throw new \RuntimeException('Failed to get response', 0, $ex);
        }

        // if success level, 
        if(2 == floor($response->getStatusCode()/100)) {
            $contentType = $response->getHeader('Content-Type');

            switch($contentType) {
            case 'application/json':
                return $response->json();
            case 'application/xml':
                return $response->xml();
            default:
                //throw new UnsupportedFormatException(sprintf('Content-Type "%s" is not supported.', $response->getHeader('Content-Type')));
                throw new \RuntimeException(sprintf('Content-Type "%s" is not supported.', $contentType));
            }
        }

        throw new \RuntimeException(sprintf('Failed to get the response: StatusCode [%d]', $response->getStatusCode()));
    }
927549
private function getQueries()
    {
        $queries = [
            'all'      => $this->queryFactory->create(
                QueryInterface::TYPE_BOOL,
                []
            ),
            'searches' => $this->queryFactory->create(
                QueryInterface::TYPE_TERM,
                [
                    'field' => 'page.type.identifier',
                    'value' => 'catalogsearch_result_index',
                ]
            ),
        ];

        return $queries;
    }
425570
public function findByIds(array $ids): array
    {
        $result = [];
        if (count($ids) > 0) {
            $queryBuilder = $this->entityManager->createQueryBuilder();
            $queryBuilder->select('i')
                         ->from(Item::class, 'i')
                         ->andWhere('i.id IN (:ids)')
                         ->setParameter('ids', array_values($ids));

            $result = $queryBuilder->getQuery()->getResult();
        }
        return $result;
    }
787656
public function getAll(array $queryParams = [])
    {
        $response = $this->api->logs()->getAll($queryParams);

        return new LogsResponse($response);
    }
1255837
public function getAlters()
    {
        $queries = [];
        if ($this->tablesAlter === null) {
            return $queries;
        }

        $platform = $this->connection->getDatabasePlatform();

        /** @var $tableDiff TableDiff */
        foreach ($this->tablesAlter as $tableName => $tableDiff) {
            $queries[$tableName] = $platform->getAlterTableSQL($tableDiff);
        }

        return $queries;
    }
858972
private function executeQueries(array $queries)
    {
        foreach ($queries as $query) {
            $this->connection->prepare($query)->execute();
        }
    }
185132
public function addQueries($queries) {
        if(is_array($queries)) {
            foreach($queries as $query) {
                $this->addQuery($query);
            }

            new Logger('Queries added to the queue.', Logger::DEBUG, __CLASS__, __LINE__);
            return $this;
        }

        new Logger('Failed to add to the queue.', Logger::ERROR, __CLASS__, __LINE__);
        return $this;
    }
147170
public function getQueries()
    {
        return array_merge(
            $this->createNamespaceQueries,
            $this->createTableQueries,
            $this->createSequenceQueries,
            $this->createFkConstraintQueries
        );
    }
158522
protected function _getQueryLog()
    {
        $queryLog = [];
        $sources = ConnectionManager::configured();
        foreach ($sources as $source) {
            $logger = ConnectionManager::get($source)->getLogger();
            if (method_exists($logger, 'getLogs')) {
                $queryLog[$source] = $logger->getLogs();
            }
        }

        return $queryLog;
    }
985283
public function getRecords($filters = array())
	{
		$entries = self::all();

		$c = $entries->getTableName();
		$e = '#__extensions';

		$entries
			->select($c . '.*,' . $e . '.name')
			->join($e, $e . '.element', $c . '.component', 'inner')
			->whereEquals($e . '.type', 'component');

		if (isset($filters['component']) && $filters['component'])
		{
			$entries->whereEquals($e . '.element', $filters['component']);
		}

		return $entries
			->ordered($c . '.component', 'asc')
			->rows();
	}