Query

final class Query extends QueryOps with Renderable

Collection representation of a query string

It is a indexed sequence of key and maybe a value pairs which maps precisely to a query string, modulo the identity of separators.

When rendered, the resulting String will have the pairs separated by '&' while the key is separated from the value with '='

Companion
object
trait QueryOps
class Object
trait Matchable
class Any

Value members

Concrete methods

def ++(pairs: Iterable[(String, Option[String])]): Query
def +:(elem: KeyValue): Query
def :+(elem: KeyValue): Query
def apply(idx: Int): KeyValue
def drop(n: Int): Query
def dropRight(n: Int): Query
override def equals(that: Any): Boolean
Definition Classes
Any
def exists(f: KeyValue => Boolean): Boolean
def filter(f: KeyValue => Boolean): Query
def filterNot(f: KeyValue => Boolean): Query
def foldLeft[Z](z: Z)(f: (Z, KeyValue) => Z): Z
def foldRight[Z](z: Eval[Z])(f: (KeyValue, Eval[Z]) => Eval[Z]): Eval[Z]
def foreach(f: KeyValue => Unit): Unit
override def hashCode: Int
Definition Classes
Any
def isEmpty: Boolean
def length: Int
def nonEmpty: Boolean
def pairs: Vector[KeyValue]
override def render(writer: Writer): writer

Render the Query as a String.

Render the Query as a String.

Pairs are separated by '&' and keys are separated from values by '='

Definition Classes
def slice(from: Int, until: Int): Query
def toList: List[(String, Option[String])]
def toVector: Vector[(String, Option[String])]

Inherited methods

def +*?[T](values: Seq[T])(implicit evidence$6: QueryParam[T], evidence$7: QueryParamEncoder[T]): Self

alias for withQueryParam

alias for withQueryParam

Inherited from
QueryOps
def +*?[T](value: T)(implicit evidence$4: QueryParamKeyLike[T], evidence$5: QueryParamEncoder[T]): Self

alias for withQueryParam

alias for withQueryParam

Inherited from
QueryOps
def ++?[K, T](param: (K, Seq[T]))(implicit evidence$11: QueryParamKeyLike[K], evidence$12: QueryParamEncoder[T]): Self

alias for withQueryParam

alias for withQueryParam

Inherited from
QueryOps
def +?[K](name: K)(implicit evidence$10: QueryParamKeyLike[K]): Self

alias for withQueryParam

alias for withQueryParam

Inherited from
QueryOps
def +?[K, T](param: (K, T))(implicit evidence$8: QueryParamKeyLike[K], evidence$9: QueryParamEncoder[T]): Self

alias for withQueryParam

alias for withQueryParam

Inherited from
QueryOps
def +?[T](implicit evidence$3: QueryParam[T]): Self

alias for withQueryParam

alias for withQueryParam

Inherited from
QueryOps
def +??[T](value: Option[T])(implicit evidence$15: QueryParam[T], evidence$16: QueryParamEncoder[T]): Self

alias for withOptionQueryParam

alias for withOptionQueryParam

Inherited from
QueryOps
def +??[K, T](param: (K, Option[T]))(implicit evidence$13: QueryParamKeyLike[K], evidence$14: QueryParamEncoder[T]): Self

alias for withOptionQueryParam

alias for withOptionQueryParam

Inherited from
QueryOps
def -?[K](key: K)(implicit evidence$17: QueryParamKeyLike[K]): Self

alias for removeQueryParam

alias for removeQueryParam

Inherited from
QueryOps
def -?[T](implicit key: QueryParam[T]): Self

alias for removeQueryParam

alias for removeQueryParam

Inherited from
QueryOps
def =?[T](q: Map[String, List[T]])(implicit evidence$2: QueryParamEncoder[T]): Self

alias for setQueryParams

alias for setQueryParams

Inherited from
QueryOps
def ?[K](name: K)(implicit evidence$1: QueryParamKeyLike[K]): Boolean

alias for containsQueryParam

alias for containsQueryParam

Inherited from
QueryOps
def containsQueryParam[K](key: K)(implicit evidence$18: QueryParamKeyLike[K]): Boolean
Inherited from
QueryOps
def containsQueryParam[T](implicit key: QueryParam[T]): Boolean

Checks if a specified parameter exists in the Query. A parameter without a name can be checked with an empty string.

Checks if a specified parameter exists in the Query. A parameter without a name can be checked with an empty string.

Inherited from
QueryOps
def removeQueryParam[K](key: K)(implicit evidence$19: QueryParamKeyLike[K]): Self

Creates maybe a new Self without the specified parameter in query. If no parameter with the given key exists then this will be returned.

Creates maybe a new Self without the specified parameter in query. If no parameter with the given key exists then this will be returned.

Inherited from
QueryOps
def renderString: String

Generates a String rendering of this object

Generates a String rendering of this object

Inherited from
Renderable
def setQueryParams[K, T](params: Map[K, Seq[T]])(implicit evidence$20: QueryParamKeyLike[K], evidence$21: QueryParamEncoder[T]): Self

Creates maybe a new Self with the specified parameters. The entire Query will be replaced with the given one.

Creates maybe a new Self with the specified parameters. The entire Query will be replaced with the given one.

Inherited from
QueryOps
override def toString: String
Definition Classes
Renderable -> Any
Inherited from
Renderable
def withMultiValueQueryParams[T, K](params: Map[K, Seq[T]])(implicit evidence$30: QueryParamEncoder[T], evidence$31: QueryParamKeyLike[K]): Self

Creates maybe a new Self with all the specified parameters in the Query. If any of the given parameters' keys already exists, the value(s) will be replaced. Parameters from the input map are added left-to-right, so if a parameter with a given key is specified more than once, it will be self-overwriting.

Creates maybe a new Self with all the specified parameters in the Query. If any of the given parameters' keys already exists, the value(s) will be replaced. Parameters from the input map are added left-to-right, so if a parameter with a given key is specified more than once, it will be self-overwriting.

Inherited from
QueryOps
def withOptionQueryParam[T](value: Option[T])(implicit evidence$34: QueryParam[T], evidence$35: QueryParamEncoder[T]): Self

Creates maybe a new Self with the specified parameter in the Query. If the value is empty or if the parameter to be added equal the existing entry the same instance of Self will be returned. If a parameter with the given name already exists the values will be replaced.

Creates maybe a new Self with the specified parameter in the Query. If the value is empty or if the parameter to be added equal the existing entry the same instance of Self will be returned. If a parameter with the given name already exists the values will be replaced.

Inherited from
QueryOps
def withOptionQueryParam[T, K](key: K, value: Option[T])(implicit evidence$32: QueryParamEncoder[T], evidence$33: QueryParamKeyLike[K]): Self

Creates maybe a new Self with the specified parameter in the Query. If the value is empty or if the parameter to be added equal the existing entry the same instance of Self will be returned. If a parameter with the given key already exists the values will be replaced.

Creates maybe a new Self with the specified parameter in the Query. If the value is empty or if the parameter to be added equal the existing entry the same instance of Self will be returned. If a parameter with the given key already exists the values will be replaced.

Inherited from
QueryOps
def withQueryParam[T, K](key: K, values: Seq[T])(implicit evidence$26: QueryParamEncoder[T], evidence$27: QueryParamKeyLike[K]): Self

Creates maybe a new Self with the specified parameters in the Query. If a parameter with the given key already exists the values will be replaced.

Creates maybe a new Self with the specified parameters in the Query. If a parameter with the given key already exists the values will be replaced.

Inherited from
QueryOps
def withQueryParam[T, K](key: K, value: T)(implicit evidence$24: QueryParamEncoder[T], evidence$25: QueryParamKeyLike[K]): Self

Creates maybe a new Self with the specified parameter in the Query. If a parameter with the given key already exists the values will be replaced. If the parameter to be added equal the existing entry the same instance of Self will be returned.

Creates maybe a new Self with the specified parameter in the Query. If a parameter with the given key already exists the values will be replaced. If the parameter to be added equal the existing entry the same instance of Self will be returned.

Inherited from
QueryOps
def withQueryParam[K](key: K)(implicit evidence$23: QueryParamKeyLike[K]): Self

Creates a new Self with the specified parameter in the Query. If a parameter with the given key already exists the values will be replaced with an empty list.

Creates a new Self with the specified parameter in the Query. If a parameter with the given key already exists the values will be replaced with an empty list.

Inherited from
QueryOps
def withQueryParam[T](implicit evidence$22: QueryParam[T]): Self

Creates a new Self with the specified parameter in the Query. If a parameter with the given QueryParam.key already exists the values will be replaced with an empty list.

Creates a new Self with the specified parameter in the Query. If a parameter with the given QueryParam.key already exists the values will be replaced with an empty list.

Inherited from
QueryOps
def withQueryParams[T, K](params: Map[K, T])(implicit evidence$28: QueryParamEncoder[T], evidence$29: QueryParamKeyLike[K]): Self

Creates maybe a new Self with all the specified parameters in the Query. If any of the given parameters' keys already exists, the value(s) will be replaced. Parameters from the input map are added left-to-right, so if a parameter with a given key is specified more than once, it will be self-overwriting.

Creates maybe a new Self with all the specified parameters in the Query. If any of the given parameters' keys already exists, the value(s) will be replaced. Parameters from the input map are added left-to-right, so if a parameter with a given key is specified more than once, it will be self-overwriting.

Inherited from
QueryOps

Concrete fields

lazy val multiParams: Map[String, Seq[String]]

Map[String, Seq[String]] representation of the Query

Map[String, Seq[String]] representation of the Query

Params are represented as a Seq[String] and may be empty.

lazy val params: Map[String, String]

Map[String, String] representation of the Query

Map[String, String] representation of the Query

If multiple values exist for a key, the first is returned. If none exist, the empty String "" is returned.