Creates a Query object from a string
495612
public function parse($string, $postprocessing = true)
    {
        return $this->visitString($string, $this->createQueryVisitor(), $postprocessing);
    }
237944
function fromQueryStringWithOptions(obj, opts) {
  var str = String(obj || '').replace(/^.*?\?/, ''), result = {}, auto;
  opts = opts || {};
  if (str) {
    forEach(str.split('&'), function(p) {
      var split = p.split('=');
      var key = decodeURIComponent(split[0]);
      var val = split.length === 2 ? decodeURIComponent(split[1]) : '';
      auto = opts.auto !== false;
      parseQueryComponent(result, key, val, opts.deep, auto, opts.separator, opts.transform);
    });
  }
  return result;
}
650272
public static Query create(String query) 
		throws QueryParserException
	{
		QueryTokenizer tokenizer = new QueryTokenizerImpl();
		QueryParser parser = new QueryParserImpl();

		return parser.parse(tokenizer.tokenize(query));
	}
956205
function parseQuery(str) {
    var i, ps, p, n, k, v, l;
    var pairs = [];

    if (typeof(str) === 'undefined' || str === null || str === '') {
      return pairs;
    }

    if (str.indexOf('?') === 0) {
      str = str.substring(1);
    }

    ps = str.toString().split(re.query_separator);

    for (i = 0, l = ps.length; i < l; i++) {
      p = ps[i];
      n = p.indexOf('=');

      if (n !== 0) {
        k = decode(p.substring(0, n));
        v = decode(p.substring(n + 1));
        pairs.push(n === -1 ? [p, null] : [k, v]);
      }

    }
    return pairs;
  }
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
1071064
function genQueryString (options) {

    if ( !options.queryParams ) {
        return "";
    }

    log(options.verbose,"Now generating query string value ...");

    var queryStringParams = [];

    Object.keys(options.queryParams).forEach(function (key) {
        queryStringParams.push(createEncodedParam(key,options.queryParams[key]));
    });

    var queryString = "?";

    log(options.verbose,"Query string key/value pairs are:");

    for ( var i=0; i<queryStringParams.length; i++ ) {
        log(options.verbose,"  "+queryStringParams[i].key+"="+queryStringParams[i].value);
        queryString += queryStringParams[i].key+"="+queryStringParams[i].value;
        if ( queryStringParams[i+1] ) {
            queryString += "&";
        }
    }

    log(options.verbose,"Query string value is: "+queryString);

    return queryString;
}
513661
function (query, params, stringifier) {
    if (!query || !query.length || !params) {
      return query;
    }
    if (!stringifier) {
      stringifier = function (a) {return a.toString()};
    }
    var parts = [];
    var isLiteral = false;
    var lastIndex = 0;
    var paramsCounter = 0;
    for (var i = 0; i < query.length; i++) {
      var char = query.charAt(i);
      if (char === "'" && query.charAt(i-1) !== '\\') {
        //opening or closing quotes in a literal value of the query
        isLiteral = !isLiteral;
      }
      if (!isLiteral && char === '?') {
        //is a placeholder
        parts.push(query.substring(lastIndex, i));
        parts.push(stringifier(params[paramsCounter++]));
        lastIndex = i+1;
      }
    }
    parts.push(query.substring(lastIndex));
    return parts.join('');
  }
317945
def parse_querystring(self, req, name, field):
        """"""
        return core.get_value(req.query, name, field)
1362128
def _get_query_parts(self, query_str, search_options=None):
        

        if search_options is None:
            search_options = {}

        if query_str is None:
            raise NipapValueError("'query_string' must not be None")

        # find query parts
        query_str_parts = []
        try:
            for part in shlex.split(query_str.encode('utf-8')):
                query_str_parts.append({ 'string': part.decode('utf-8') })
        except ValueError as exc:
            if unicode(exc) == 'No closing quotation':
                raise NipapValueError(unicode(exc))
            raise exc

        # Handle empty search.
        # We need something to iterate over, but shlex.split() returns
        # zero-element list for an empty string, so we have to append one
        # manually
        if len(query_str_parts) == 0:
            query_str_parts.append({ 'string': '' })

        return query_str_parts
96503
def query(self,query_string,toprint=False):
		""""""
		qq=SearchTerm(query_string)
		matchcount=0
		matches=[]
		for word in self.words():
			for match in word.search(qq):
				matches.append(match)
				matchcount+=1
				if "Word" in str(type(match)):
					matchstr=""
				else:
					matchstr=str(match)
				if toprint:
					word.om(makeminlength(str(matchcount),int(being.linelen/6))+"\t"+makeminlength(str(word),int(being.linelen))+"\t"+matchstr)
		return matches
71218
function buildQueryString(params) {
    var querystring = '';
    for(param in params) {
        querystring += '&' + param + '=' + params[param];
    }
    return querystring;
}
502700
def build_query_string(self, data):
        
        queryValues = []
        keys_to_be_removed = []
        for key, value in data.items():
            if key not in ['version', 'restApi', 'resourcePath']:
                if not key == 'point':
                    queryValues.append('{0}={1}'.format(key, value))
                    keys_to_be_removed.append(key)
                keys_to_be_removed.append(key)
        queryString = '&'.join(queryValues)
        data['query'] = '{0}?{1}'.format(data['point'], queryString)
        for k in list(set(keys_to_be_removed)):
            del data[k]
        return data
955232
function encodeQueryAsString(query = {}) {
  const params = Object.keys(query).map((name) =>
    [encodeURIComponent(name), encodeURIComponent(query[name])].join('=')
  );
  return params.length ? `?${params.join('&')}` : '';
}
77327
def parse_querystring(self, req, name, field):
        """"""
        return core.get_value(req.params, name, field)
989041
function querystringify(obj, prefix) {
  prefix = prefix || '';

  var pairs = []
    , value
    , key;

  //
  // Optionally prefix with a '?' if needed
  //
  if ('string' !== typeof prefix) prefix = '?';

  for (key in obj) {
    if (has.call(obj, key)) {
      value = obj[key];

      //
      // Edge cases where we actually want to encode the value to an empty
      // string instead of the stringified value.
      //
      if (!value && (value === null || value === undef || isNaN(value))) {
        value = '';
      }

      key = encodeURIComponent(key);
      value = encodeURIComponent(value);

      //
      // If we failed to encode the strings, we should bail out as we don't
      // want to add invalid strings to the query.
      //
      if (key === null || value === null) continue;
      pairs.push(key +'='+ value);
    }
  }

  return pairs.length ? prefix + pairs.join('&') : '';
}
1319530
def parse_query(qs, d = '&;')
      params = {}
      (qs || '').split(/[#{d}] */n).each do |p|
        k, v = p.split('=', 2).map { |str| str } # NOTE: uri_unescape
        k = k.to_sym
        if cur = params[k]
          if cur.class == Array
            params[k] << v
          else
            params[k] = [cur, v]
          end
        else
          params[k] = v
        end
      end
      params
    end
558834
def query_string(context, **kwargs):
    """"""
    params = context["request"].GET.copy()

    for key, value in list(kwargs.items()):
        params[key] = value

    return "?" + params.urlencode()