Builds the necessary query string
198341
def build_query_string(options)
      options = camelcase_keys(options)
      
      query = ''

      options.each do |k,v|
        if k == :address
          if RUBY_VERSION.to_f >= 1.9
            if v.instance_of?(String)
              v.each_line { |address| query += "#{ '&' if query != '' }address=#{CGI.escape address}" }
            else
              v.each { |address| query += "#{ '&' if query != '' }address=#{CGI.escape address}" }
            end
          else
            v.each { |address| query += "#{ '&' if query != '' }address=#{CGI.escape address}" }
          end
        else
          query += "#{ '&' if query != '' }#{k.to_s}=#{CGI.escape v}"
        end
      end

      query
    end
752335
private String buildQuery() {
        fetchKeys();

        List<String> columns = getSelectColumns();
        String selectColumnList = columns.size() == 0 ? "*" : makeColumnList(columns);
        String partitionKeyList = makeColumnList(partitionKeys);

        return String.format("SELECT %s FROM %s.%s WHERE token(%s)>? AND token(%s)<=?" + getAdditionalWhereClauses(),
                selectColumnList, quote(keyspace), quote(cfName), partitionKeyList, partitionKeyList);
    }
733345
def build_url_query(current_path, datum = nil)
      unless datum.nil?
        current_path += '?'
        current_path += URI.encode_www_form datum
      end
      current_path
    end
1017284
def query(self, queryString):
    '''
    
    '''
    self._setHeaders('query')
    return self._sforce.service.query(queryString)
501618
function _buildQuery(){

            var url         = data.url;
            var cache       = typeof data.cache !== 'undefined' ? !!data.cache : true;
            var queryString = data.queryString || '';
            var _data       = data.data;

            //add a cache buster
            if(cache === false){
                queryString += '&ajabuster=' + new Date().getTime();
            }

            url = appendQueryString(url, queryString);

            if(_data && !_dataInBody()){
                url =  appendQueryString(url, _data);
            }
            return url;
        }
396864
public static function buildQueryString($params, $separator = '&', $key = null)
    {
        $query = '';
        foreach ($params as $k => $v) {
            $k = urlencode($k);
            if (!empty($key)) {
                $k = $key.'['.$k.']';
            }
            if (is_null($v)) {
                continue;
            } elseif (is_array($v)) {
                $query .= call_user_func(array(__CLASS__, __FUNCTION__), $v, $separator, $k).$separator;
            } else {
                if ($v === false) {
                    $v = 0;
                } elseif ($v === true) {
                    $v = '';
                }
                $v = str_replace(array('%2F','%2C','%3A','%7C'), array('/',',',':','|'), urlencode($v));
                $query .= $k.'='.$v.$separator;
            }
        }
        $query = rtrim(str_replace('='.$separator, $separator, $query), $separator);
        return $query;
    }
835529
def query_string=(query)
      self.query_params.clear

      ::URI::QueryParams.parse(query).each do |name,value|
        self.query_params.new(
          :name  => URLQueryParamName.first_or_new(:name => name),
          :value => value
        )
      end

      return query
    end
416476
def add_query_params(url, params):
    
    def encode(s):
        return force_bytes(s, settings.DEFAULT_CHARSET)
    params = dict([(encode(k), encode(v)) for k, v in params.items() if v])

    parts = list(urlparse(url))
    query = dict(parse_qsl(parts[4]))
    query.update(params)
    parts[4] = urlencode(query)
    return urlunparse(parts)
578313
def _build_query_url(self, page = None, verbose = False):
        
        query = []
#        # build the filters
#        for afilter in self.filters.keys():
#            value = self.filters[afilter]
#            print"filter:%s value:%s" % (afilter,value)
#            value = urlencode(value)
#            query_str = u"%s=%s" % (afilter, value)
        if len(self.filters) > 0:
            query.append(urlencode(self.filters))
        if self.sort:
            query_str = u"%s=%s" % (u"sort", self.sort)
            query.append(query_str)
        if self.sort_by:
            query_str = u"%s=%s" % (u"sort_by", self.sort_by)
            query.append(query_str)
        if self.per_page:
            query_str = u"%s=%s" % (u"per_page", self.per_page)
            query.append(query_str)
        if page:
            query_str = u"%s=%s" % (u"page", page)
            query.append(query_str)
        query = u"?%s" % (u"&".join(query))
        url = u"%s%s" % (self.get_list_endpoint()['href'],query)
        url = u"%s%s%s" % (self.__api__.base_url, API_BASE_PATH, url)
        msg = "_build_query_url: url:%s" % url
        log.debug(msg)
        if verbose:
            print msg
        return url
755474
def construct_url(self):
        """"""
        path = [self.path]
        path.extend([str(x) for x in self.params])

        url = self.client.base_url + '/'.join(x for x in path if x)
        query = self.kwargs.get('query')

        if query:
            # Dict -> List
            if type(query) is dict:
                query = query.items()

            # Remove items with `None` value
            query = [
                (k, v) for (k, v) in query
                if v is not None
            ]

            # Encode query, append to URL
            url += '?' + urlencode(query)

        return url
975891
def prepare_query_params(**kwargs):
    
    return [
        (sub_key, sub_value)
        for key, value in kwargs.items()
        for sub_key, sub_value in expand(value, key)
        if sub_value is not None
    ]
77327
def parse_querystring(self, req, name, field):
        """"""
        return core.get_value(req.params, name, field)
516201
def __build_url(self, api_call, **kwargs):
        """"""
        kwargs['key'] = self.api_key
        if 'language' not in kwargs:
            kwargs['language'] = self.language
        if 'format' not in kwargs:
            kwargs['format'] = self.__format
        api_query = urlencode(kwargs)

        return "{0}{1}?{2}".format(urls.BASE_URL,
                                   api_call,
                                   api_query)
974178
def build_collection_query_object(name, additional_parameters, *args)
    root = "/#{name.to_s}"
    if args.empty?
      #nothing to add
    elsif args.size == 1
      if args.first.to_s =~ /\d+/
        id_metadata = find_id_metadata(name.to_s)
        root << build_id_path(args.first, id_metadata)
      else
        root << "(#{args.first})"
      end
    else
      root << "(#{args.join(',')})"
    end
    QueryBuilder.new(root, additional_parameters)
  end
136492
def query_param(name, field, required=False):
    
    parameter = build_parameter(field)
    parameter["name"] = name
    parameter["in"] = "query"
    parameter["required"] = False

    return swagger.QueryParameterSubSchema(**parameter)
1355882
private static function getUrlQueryString() {
        // The variable $_SERVER['QUERY_STRING'] is set by the server and can differ, e.g. it might hold additional
        // parameters or it might be empty (nginx).

        if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING'])) {
            $query = $_SERVER['QUERY_STRING'];
        }
        else {
            $query = strRightFrom($_SERVER['REQUEST_URI'], '?');
        }
        return $query;
    }
1245000
private function searchQuery(): string
    {
        $url = \parse_url($this->app->utilities->page->URL('full'));
        \parse_str(($url['query'] ?? ''), $query_params);

        return $query_params['s'] ?? '';
    }