get query with parameters in it
343621
public static function getSqlWithParams(string $sql, array $params = []): string
    {
        if (! empty($params)) {
            $indexed = ($params === array_values($params));
            foreach ($params as $k => $v) {
                if (is_string($v)) {
                    $v = "'${v}'";
                }
                if (is_array($v)) {
                    $v = "'" . implode("','", $v) . "'";
                }
                if ($indexed) {
                    $sql = preg_replace('/\?/', $v, $sql, 1);
                } else {
                    $sql = str_replace(":${k}", $v, $sql);
                }
            }
        }

        return str_replace(PHP_EOL, '', $sql);
    }
1283596
public function query($query, $params = [])
    {
        return $this->client->query($this->name, $query, $params);
    }
1045537
public function withQueryParams($query): self
    {
        if (!is_string($query)) {
            $query = UriHelper::buildQuery((array) $query);
        }

        return $this->withQuery($query);
    }
560529
def parse_querystring(self, req, name, field):
        """"""
        return get_value(req.query_arguments, name, field)
376045
public function getQueryParameters($e)
    {
        $request = $e->getRequest();
        $getString = $request->getQuery()->toString();
        
        if ($getString != '')
            $getString = '?' . $getString;
        
        return $getString;
    }
762486
def query_parameters(self):
        
        result = getattr(self, "_query_parameters", None)
        if result is None:
            result = self._query_parameters = normalize_query_parameters(
                self.query_string)
        return result
1110471
def get_query_params
      out = {}
      search_attributes.each do |val|
        out[val.field]=self.send(val.field) unless self.send(val.field).blank?
      end

      out
    end
1172030
def get_query_kwargs(**kwargs):
    """"""
    query_kwargs = {}

    query = kwargs.pop("query")
    if query:
        query_kwargs["query"] = query

    return query_kwargs
542430
public static String getParameterValueFromQuery(String query, String paramName) {
        String[] components = query.split("&");

        for (String keyValuePair : components) {
            String[] pairComponents = keyValuePair.split("=");

            if (pairComponents.length == 2) {
                try {
                    String key = URLDecoder.decode(pairComponents[0], "utf-8");
                    if (key.compareTo(paramName) == 0) {
                        return URLDecoder.decode(pairComponents[1], "utf-8");
                    }
                } catch (UnsupportedEncodingException e) {
                    logger.error("getParameterValueFromQuery failed with exception: " + e.getLocalizedMessage(), e);
                }

            }
        }

        return null;
    }
421112
def query(query, args_or_dbname, params = {})
      query = transmute_data(query)
      args = args_or_dbname.is_a?(String) ? [db_alias(args_or_dbname)] : args_or_dbname
      args = transmute_data(args)
      get root_url("api/query"), params.merge(:q => query, :args => args)
    end
970666
private function bind_params( $query, $bindings, $update = false )
	{

		$query    = str_replace( '"', '`', $query );
		$bindings = $this->prepareBindings( $bindings );

		if ( ! $bindings ) {
			return $query;
		}

		$bindings = array_map( function ( $replace )
		{
			if ( is_string( $replace ) ) {
				$replace = "'" . esc_sql( $replace ) . "'";
			} elseif ( $replace === null ) {
				$replace = "null";
			}

			return $replace;
		}, $bindings );

		$query = str_replace( [ '%', '?' ], [ '%%', '%s' ], $query );
		$query = vsprintf( $query, $bindings );

		return $query;
	}
862621
def _get_query_params(self):
        
        result = {}
        if self.next_page_token is not None:
            result[self._PAGE_TOKEN] = self.next_page_token
        if self.max_results is not None:
            result[self._MAX_RESULTS] = self.max_results - self.num_results
        result.update(self.extra_params)
        return result
430301
def dmql(query):
        """"""
        if isinstance(query, dict):
            raise ValueError("You supplied a dictionary to the dmql_query parameter, but a string is required."
                                " Did you mean to pass this to the search_filter parameter? ")

        # automatically surround the given query with parentheses if it doesn't have them already
        if len(query) > 0 and query != "*" and query[0] != '(' and query[-1] != ')':
            query = '({})'.format(query)
        return query
108902
function getQueryParameterValue(url, parameterName) {
        var parts;
        var query = (url || '').split('?');
        if (query && query.length > 0) {
            parts = query[1];
        }
        else {
            parts = '';
        }
        var vars = parts.split('&');
        for (var i = 0; i < vars.length; i++) {
            var pair = vars[i].split('=');
            if (decodeURIComponent(pair[0]) == parameterName) {
                return decodeURIComponent(pair[1]);
            }
        }
        // not found
        return null;
    }
8228
def _getParameters(self):
        """"""
        param = self.query._getParameters() 
        index = self._getFilterIndex()
        param.update({
        'filter['+str(index)+'][columnAlias]' : self.__column,
        'filter['+str(index)+'][data][type]' : self.__type,
        'filter['+str(index)+'][data][value]' : self.__value,
        'filter['+str(index)+'][data][comparison]' : self.__comparison})        
        #self.__column.getColumnAlias()
        return param
258304
def get_query_params(self):
        """"""
        params = self.request.query_params.copy()
        params.update(self.request.data)
        return params
71218
function buildQueryString(params) {
    var querystring = '';
    for(param in params) {
        querystring += '&' + param + '=' + params[param];
    }
    return querystring;
}