Realiza a chamada ao WS da BIPBOP
@param string $query Query da BIPBOP
@param array $parameters
@return \DOMDocument
170708
public function post($query, Array $parameters = [], $autoParser = true) {
        curl_setopt_array($this->resource, [
            CURLOPT_POSTFIELDS => array_merge($parameters, [
                self::PARAMETER_QUERY => $query,
                self::PARAMETER_APIKEY => $this->apiKey
            ])
        ]);

        $dom = new \DOMDocument;
        $ret = curl_exec($this->resource);
        if (!$autoParser) return $ret;
        $dom->loadXML($ret);
        static::assert($dom);
        return $dom;
    }
756797
protected function buildUpdateQuery(SQLUpdate $query, array &$parameters)
    {
        $sql  = $this->buildUpdateFragment($query, $parameters);
        $sql .= $this->buildWhereFragment($query, $parameters);
        return $sql;
    }
859852
public function _browse($query, $parameters = [])
    {
        /** @var \AlgoliaSearch\Laravel\ModelHelper $modelHelper */
        $modelHelper = App::make('\AlgoliaSearch\Laravel\ModelHelper');

        $index = null;

        if (isset($parameters['index'])) {
            $index = $modelHelper->getIndices($this, $parameters['index'])[0];
            unset($parameters['index']);
        } else {
            $index = $modelHelper->getIndices($this)[0];
        }

        $result = $index->browse($query, $parameters);

        return $result;
    }
718238
public function fetchPairs($query, array $parameters = array())
    {
        $parameters = $this->parameterTransformer->transform($parameters);
        return $this->db->fetchPairs($query, $parameters);
    }
482168
public function query(
        Query $query,
        array $parameters = []
    ): Result {
        $resultingItems = $this->items[$this->getIndexKey()] ?? [];

        if (!empty($query->getFilters())) {
            foreach ($query->getFilters() as $filter) {
                if (Filter::TYPE_QUERY === $filter->getFilterType() && $filter->getValues() === ['']) {
                    continue;
                }

                if ('_id' !== $filter->getField()) {
                    throw new LogicException('Queries by field different than UUID not allowed in InMemoryRepository. Only for testing purposes.');
                }

                $resultingItems = [];
                $itemUUIDs = $filter->getValues();
                foreach ($itemUUIDs as $itemUUID) {
                    $resultingItems[$itemUUID] = $this->items[$this->getIndexKey()][$itemUUID] ?? null;
                }
            }
        }

        $resultingItems = array_values(
            array_slice(
                array_filter($resultingItems),
                $query->getFrom(),
                $query->getSize()
            )
        );

        $items = $this->items[$this->getIndexKey()] ?? [];
        $result = new Result($query->getUUID(), count($items), count($resultingItems));
        foreach ($resultingItems as $resultingItem) {
            $result->addItem($resultingItem);
        }

        return $result;
    }
1038047
protected function namedParams(&$query, &$params)
    {
        if (!is_array($params)) {
            return;
        }

        $pattern = "a-zA-Z0-9_";

        if (!preg_match("/\?([" . $pattern . "]+)/", $query)) {
            return;
        }

        $oldParams = $params;
        $params = [];

        reset($oldParams);
        $this->modifyQuery($query, function($part) use(&$params, &$oldParams, $pattern) {
            return preg_replace_callback("/\?([" . $pattern . "]*)([^" . $pattern . "]|$)/", function($match) use(&$params, &$oldParams) {
                if ($key = $match[1]) {
                    $params[] = $oldParams[$key];
                } else {
                    $params[] = current($oldParams);
                    next($oldParams);
                }
                return "?" . $match[2];
            }, $part);
        });
    }
436120
public function searchCompany($query, CompanySearchQuery $parameters, array $headers = [])
    {
        $data = $this->getApi()->searchCompany($query, $this->getParameters($parameters), $headers);

        return $this->getCompanyFactory()->createResultCollection($data);
    }
908136
protected function buildDeleteQuery(SQLDelete $query, array &$parameters)
    {
        $sql  = $this->buildDeleteFragment($query, $parameters);
        $sql .= $this->buildFromFragment($query, $parameters);
        $sql .= $this->buildWhereFragment($query, $parameters);
        return $sql;
    }
930910
public function searchCompany($query, array $parameters = [], array $headers = [])
    {
        return $this->get('search/company', array_merge($parameters, [
            'query' => $query
        ], $headers));
    }
891698
public function getBatchQuery($query, array $bindings) {
        return new BatchQuery($this->getClient(), $query, $this->prepareBindings($bindings));
    }
667242
public function executeLastInsertId($query, $parameters = [])
    {
        $statement = $this->link->prepare($query);
        $statement->execute($parameters);
        return $this->link->lastInsertId();
    }
774264
public function insert($query, $params = array())
    {
        $this->_testQueryStarts($query, 'insert');
        return $this->_executeQuery($query, $params, true);
    }
1341465
public function fetchAssoc($query, array $parameters = array())
    {
        $parameters = $this->parameterTransformer->transform($parameters);
        return $this->db->fetchAssoc($query, $parameters);
    }
962899
public function query($query, $options = [])
    {
        $url = $this->instanceURLRepo->get();
        $url .= $this->resourceRepo->get('query');
        $url .= '?q=';
        $url .= urlencode($query);

        $queryResults = $this->request($url, $options);

        return $queryResults;
    }
1045537
public function withQueryParams($query): self
    {
        if (!is_string($query)) {
            $query = UriHelper::buildQuery((array) $query);
        }

        return $this->withQuery($query);
    }
253074
public function searchList($query, array $parameters = [], array $headers = [])
    {
        return $this->get('search/list', array_merge($parameters, [
            'query' => $query
        ], $headers));
    }
1065504
public function searchMulti($query, KeywordSearchQuery $parameters, array $headers = [])
    {
        $data       = $this->getApi()->searchMulti($query, $this->getParameters($parameters), $headers);
        $collection = new ResultCollection();

        if (null === $data) {
            return $collection;
        }

        if (array_key_exists('page', $data)) {
            $collection->setPage($data['page']);
        }

        if (array_key_exists('total_pages', $data)) {
            $collection->setTotalPages($data['total_pages']);
        }

        if (array_key_exists('total_results', $data)) {
            $collection->setTotalResults($data['total_results']);
        }

        if (array_key_exists('results', $data)) {
            foreach ($data['results'] as $item) {
                if ($item) {
                    $collection->add(null, $this->processSearchMultiItem($item));
                }
            }
        }

        return $collection;
    }