Prepares given parameters to be used in querystring.
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
    ]
653625
@PostConstruct
    private void initialize() {
        final MultivaluedMap<String, String> queryParams = uriInfo.getQueryParameters();
        final String offset = multiParam(queryParams, "offset");
        final String page = multiParam(queryParams, "page", "pageNumber");
        final String size = multiParam(queryParams, "size", "pageSize", "limit");
        final String filter = multiParam(queryParams, "filter", "searchText");
        final String sort = multiParam(queryParams, "sort", "sortOrder");
        final OrderDirection orderDirection;
        String orderBy = multiParam(queryParams, "orderBy", "sortName");

        if (StringUtils.isBlank(orderBy) || !RegexSequence.Pattern.ALPHA_NUMERIC.matcher(orderBy).matches()) {
            orderBy = null;
        }

        if ("asc".equalsIgnoreCase(sort)) {
            orderDirection = OrderDirection.ASCENDING;
        } else if ("desc".equalsIgnoreCase(sort)) {
            orderDirection = OrderDirection.DESCENDING;
        } else {
            orderDirection = OrderDirection.UNSPECIFIED;
        }

        final Pagination pagination;
        if (StringUtils.isNotBlank(offset)) {
            pagination = new Pagination(Pagination.Strategy.OFFSET, offset, size);
        } else if (StringUtils.isNotBlank(page) && StringUtils.isNotBlank(size)) {
            pagination = new Pagination(Pagination.Strategy.PAGES, page, size);
        } else {
            pagination = new Pagination(Pagination.Strategy.OFFSET, 0, 100); // Always paginate queries from resources
        }
        this.alpineRequest = new AlpineRequest(getPrincipal(), pagination, filter, orderBy, orderDirection);
    }
669959
private void appendParameter(Object value, StringBuffer buf)
    {
        if (value instanceof Query)
        {
            appendSubQuery((Query) value, buf);
        }
        else
        {
            buf.append("?");
        }
    }
1195389
public static RequestParams getRequestParams(String queryString) {
        if (null == queryString)
            return null;

        QueryStringParser parser = new QueryStringParser(queryString);
        RequestParams result = new RequestParams();
        while (parser.next()) {
            result.put(parser.getName(), parser.getValue());
        }
        return result;
    }
144026
def _create_query_string(params):
        
        parameters = params or {}

        for param, value in parameters.items():
            param_value = str(value).lower() if isinstance(value, bool) else value
            parameters[param] = param_value

        return urlencode(parameters)
560529
def parse_querystring(self, req, name, field):
        """"""
        return get_value(req.query_arguments, name, field)
133988
@SuppressWarnings("unchecked")
    public static MultiValueMap<String, String> getParamsFromQueryString(String queryString) {
        MultiValueMap queryParams = new LinkedMultiValueMap<>();

        if (StringUtils.isNotEmpty(queryString)) {
            String[] params = queryString.split("&");
            for (String param : params) {
                String[] splitParam = param.split("=");
                String paramName = splitParam[0];
                String paramValue = splitParam[1];

                queryParams.add(paramName, paramValue);
            }
        }

        return queryParams;
    }
1039787
static String appendQueryParameters( final CharSequence url, final Map<?, ?> params ) {
        final String baseUrl = url.toString();
        if( params == null || params.isEmpty() )
            return baseUrl;

        final StringBuilder result = new StringBuilder(baseUrl);

        addPathSeparator(baseUrl, result);
        addParamPrefix(baseUrl, result);

        Entry<?, ?> entry;
        Object value;
        Iterator<?> iterator = params.entrySet().iterator();
        entry = (Entry<?, ?>) iterator.next();
        result.append(entry.getKey().toString());
        result.append('=');
        value = entry.getValue();
        if( value != null )
            result.append(value);

        while( iterator.hasNext() ) {
            result.append('&');
            entry = (Entry<?, ?>) iterator.next();
            result.append(entry.getKey().toString());
            result.append('=');
            value = entry.getValue();
            if( value != null )
                result.append(value);
        }

        return result.toString();
    }
106103
function createParams(routePattern, fragment, queryString) {
            var params = routePattern.exec(fragment).slice(1);

            for (var i = 0; i < params.length; i++) {
                var current = params[i];
                params[i] = current ? decodeURIComponent(current) : null;
            }

            var queryParams = router.parseQueryString(queryString);
            if (queryParams) {
                params.push(queryParams);
            }

            return {
                params:params,
                queryParams:queryParams
            };
        }
1325521
function appendParams(url, specificParams) {
    // Assign default and specific parameters
    var params = Object.assign({}, defaultParams, specificParams);

    // Stringify the querystring params
    var paramsString = qs.stringify(params);

    // Empty params
    if (paramsString === '') {
      return url;
    }

    // Does url contain parameters already?
    var delim = url.includes('?') ? '&' : '?';

    return url + delim + paramsString;
  }
624643
def _parse_parameters(self, resource, params):
        '''
        '''
        # remove params from resource URI (needed for paginated stuff)
        parsed_uri = urlparse(resource)
        qs = parsed_uri.query
        resource = urlunparse(parsed_uri._replace(query=''))
        prms = {}
        for tup in parse_qsl(qs):
            prms[tup[0]] = tup[1]

        # params supplied to self.get() override parsed params
        for key in params:
            prms[key] = params[key]
        return resource, prms
579102
function () {
    var parts;

    if (!this.queryString) return;

    parts = this.queryString.replace('?','').split('&');

    each(parts, function (part) {
      var key = decodeURIComponent( part.split('=')[0] ),
          val = decodeURIComponent( part.split('=')[1] );

      if ( part.indexOf( '=' ) === -1 ) return;
      this._applyQueryParam( key, val );

    }, this);

  }
204322
def parameters_as_string(self):
        """"""
        params = ", ".join([ p.name for p in self.ordered_parameters ])
        return params
53451
protected final void loadQueryString(Map<String, String[]> params) {
        for (Map.Entry<String, String[]> param : params.entrySet()) {
            loadKeys(param.getKey(), param.getValue());
        }
    }
1030711
def __ConstructQueryParams(self, query_params, request, global_params):
        """"""
        # First, handle the global params.
        global_params = self.__CombineGlobalParams(
            global_params, self.__client.global_params)
        global_param_names = util.MapParamNames(
            [x.name for x in self.__client.params_type.all_fields()],
            self.__client.params_type)
        global_params_type = type(global_params)
        query_info = dict(
            (param,
             self.__FinalUrlValue(getattr(global_params, param),
                                  getattr(global_params_type, param)))
            for param in global_param_names)
        # Next, add the query params.
        query_param_names = util.MapParamNames(query_params, type(request))
        request_type = type(request)
        query_info.update(
            (param,
             self.__FinalUrlValue(getattr(request, param, None),
                                  getattr(request_type, param)))
            for param in query_param_names)
        query_info = dict((k, v) for k, v in query_info.items()
                          if v is not None)
        query_info = self.__EncodePrettyPrint(query_info)
        query_info = util.MapRequestParams(query_info, type(request))
        return query_info
912760
function validateQueryParams() {
        var queryString;
        if (config.queryParams) {
            if (typeof config.queryParams === 'string') {
                // strip '?' if it's there, because we add it below
                queryString = config.queryParams.replace(/^\?/, '');
            } else {
                queryString = util.param(config.queryParams);
            }
        }
        config.queryString = queryString ? '?' + queryString : '';
    }
447699
def __build_query(self, routine, parameters):
        """"""

        parameter_names = []
        replacements = {}
        for i, value in enumerate(parameters):
            name = 'arg' + str(i)

            parameter_names.append(name)
            replacements[name] = value

        parameter_pieces = []
        for i, name in enumerate(parameter_names):
            if i > 0:
                parameter_pieces.append(', ')

            # Embed encoded blobs directly.
            if issubclass(replacements[name].__class__, _BlobArgumentWrapper) is True:
                parameter_pieces.append(replacements[name].encoded)
                del replacements[name]
            else:
                parameter_pieces.append(':' + name)

        query = "CALL " + routine + "(" + ''.join(parameter_pieces) + ")"

        return (query, replacements)