Packages

sealed trait Query extends QueryOps with Renderable

Representation of a query string.

When a query is none, it is represented by the Query.Empty.

When a query is parsed – it is represented by the Query.Parsed, an indexed sequence of key and maybe value pairs which maps precisely to a query string, modulo percent-encoding. The resulting String will have the pairs separated by '&' while the key is separated from the value with '='.

Otherwise, a query is represented by the Query.Raw containing unparsed string.

Source
Query.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Query
  2. Renderable
  3. QueryOps
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type Self = Query
    Attributes
    protected
    Definition Classes
    QueryQueryOps

Abstract Value Members

  1. abstract def pairs: Vector[KeyValue]
  2. abstract def render(writer: Writer): writer.type

    Base method for rendering this object efficiently

    Base method for rendering this object efficiently

    Definition Classes
    Renderable

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +*?[T](values: Seq[T])(implicit arg0: QueryParam[T], arg1: QueryParamEncoder[T]): Self

    alias for withQueryParam

    alias for withQueryParam

    Definition Classes
    QueryOps
  4. def +*?[T](value: T)(implicit arg0: QueryParamKeyLike[T], arg1: QueryParamEncoder[T]): Self

    alias for withQueryParam

    alias for withQueryParam

    Definition Classes
    QueryOps
  5. def ++(pairs: Iterable[(String, Option[String])]): Query
  6. def ++?[K, T](param: (K, Seq[T]))(implicit arg0: QueryParamKeyLike[K], arg1: QueryParamEncoder[T]): Self

    alias for withQueryParam

    alias for withQueryParam

    scala> import org.http4s.implicits._
    scala> uri"www.scala.com".++?("key" -> List("value1", "value2", "value3"))
    res1: Uri = www.scala.com?key=value1&key=value2&key=value3
    Definition Classes
    QueryOps
  7. def +:(elem: KeyValue): Query
  8. def +?[K](name: K)(implicit arg0: QueryParamKeyLike[K]): Self

    alias for withQueryParam

    alias for withQueryParam

    Definition Classes
    QueryOps
  9. def +?[K, T](param: (K, T))(implicit arg0: QueryParamKeyLike[K], arg1: QueryParamEncoder[T]): Self

    alias for withQueryParam

    alias for withQueryParam

    Definition Classes
    QueryOps
  10. def +?[T](implicit arg0: QueryParam[T]): Self

    alias for withQueryParam

    alias for withQueryParam

    Definition Classes
    QueryOps
  11. def +??[T](value: Option[T])(implicit arg0: QueryParam[T], arg1: QueryParamEncoder[T]): Self

    alias for withOptionQueryParam

    alias for withOptionQueryParam

    Definition Classes
    QueryOps
  12. def +??[K, T](param: (K, Option[T]))(implicit arg0: QueryParamKeyLike[K], arg1: QueryParamEncoder[T]): Self

    alias for withOptionQueryParam

    alias for withOptionQueryParam

    Definition Classes
    QueryOps
  13. def -?[K](key: K)(implicit arg0: QueryParamKeyLike[K]): Self

    alias for removeQueryParam

    alias for removeQueryParam

    Definition Classes
    QueryOps
  14. def -?[T](implicit key: QueryParam[T]): Self

    alias for removeQueryParam

    alias for removeQueryParam

    Definition Classes
    QueryOps
  15. def :+(elem: KeyValue): Query
  16. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def =?[T](q: Map[String, List[T]])(implicit arg0: QueryParamEncoder[T]): Self

    alias for setQueryParams

    alias for setQueryParams

    Definition Classes
    QueryOps
  18. def ?[K](name: K)(implicit arg0: QueryParamKeyLike[K]): Boolean

    alias for containsQueryParam

    alias for containsQueryParam

    Definition Classes
    QueryOps
  19. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  20. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  21. def containsQueryParam[K](key: K)(implicit arg0: QueryParamKeyLike[K]): Boolean
    Definition Classes
    QueryOps
  22. def containsQueryParam[T](implicit key: QueryParam[T]): Boolean

    Checks if a specified parameter exists in the Query.

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

    Definition Classes
    QueryOps
  23. def drop(n: Int): Query
  24. def dropRight(n: Int): Query
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  27. def exists(f: (KeyValue) => Boolean): Boolean
  28. def filter(f: (KeyValue) => Boolean): Query
  29. def filterNot(f: (KeyValue) => Boolean): Query
  30. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  31. def foldLeft[Z](z: Z)(f: (Z, KeyValue) => Z): Z
  32. def foldRight[Z](z: Eval[Z])(f: (KeyValue, Eval[Z]) => Eval[Z]): Eval[Z]
  33. def foreach(f: (KeyValue) => Unit): Unit
  34. def get(idx: Int): Option[KeyValue]
  35. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  36. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  37. def isEmpty: Boolean
  38. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  39. def length: Int
  40. lazy val multiParams: Map[String, List[String]]

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

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

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

  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. def nonEmpty: Boolean
  43. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  44. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  45. 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.

  46. val query: Query
    Attributes
    protected
    Definition Classes
    QueryQueryOps
  47. def removeQueryParam[K](key: K)(implicit arg0: QueryParamKeyLike[K]): Self

    Creates maybe a new Self without the specified parameter in query.

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

    Definition Classes
    QueryOps
  48. def renderString: String

    Generates a String rendering of this object

    Generates a String rendering of this object

    Definition Classes
    Renderable
  49. def replaceQuery(query: Query): Self
    Attributes
    protected
    Definition Classes
    QueryQueryOps
  50. def self: Self
    Attributes
    protected
    Definition Classes
    QueryQueryOps
  51. def setQueryParams[K, T](params: Map[K, Seq[T]])(implicit arg0: QueryParamKeyLike[K], arg1: QueryParamEncoder[T]): Self

    Creates maybe a new Self with the specified parameters.

    Creates maybe a new Self with the specified parameters. If any of the given parameters' keys already exists, the value(s) will be replaced.

    Definition Classes
    QueryOps
  52. def slice(from: Int, until: Int): Query
  53. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  54. def toList: List[(String, Option[String])]
  55. def toString(): String
    Definition Classes
    Renderable → Any
  56. def toVector: Vector[(String, Option[String])]
  57. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  58. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  59. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  60. def withMultiValueQueryParams[T, K](params: Map[K, Seq[T]])(implicit arg0: QueryParamEncoder[T], arg1: QueryParamKeyLike[K]): Self

    Creates maybe a new Self with all the specified parameters in the Query.

    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.

    Definition Classes
    QueryOps
  61. def withOptionQueryParam[T](value: Option[T])(implicit arg0: QueryParam[T], arg1: QueryParamEncoder[T]): Self

    Creates maybe a new Self with the specified parameter in the Query.

    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.

    Definition Classes
    QueryOps
  62. def withOptionQueryParam[T, K](key: K, value: Option[T])(implicit arg0: QueryParamEncoder[T], arg1: QueryParamKeyLike[K]): Self

    Creates maybe a new Self with the specified parameter in the Query.

    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.

    Definition Classes
    QueryOps
  63. def withQueryParam[T, K](key: K, values: Seq[T])(implicit arg0: QueryParamEncoder[T], arg1: QueryParamKeyLike[K]): Self

    Creates maybe a new Self with the specified parameters in the Query.

    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.

    Definition Classes
    QueryOps
  64. def withQueryParam[T, K](key: K, value: T)(implicit arg0: QueryParamEncoder[T], arg1: QueryParamKeyLike[K]): Self

    Creates maybe a new Self with the specified parameter in the Query.

    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.

    Definition Classes
    QueryOps
  65. def withQueryParam[K](key: K)(implicit arg0: QueryParamKeyLike[K]): Self

    Creates a new Self with the specified parameter in the Query.

    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.

    Definition Classes
    QueryOps
  66. def withQueryParam[T](implicit arg0: QueryParam[T]): Self

    Creates a new Self with the specified parameter in the Query.

    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.

    Definition Classes
    QueryOps
  67. def withQueryParams[T, K](params: Map[K, T])(implicit arg0: QueryParamEncoder[T], arg1: QueryParamKeyLike[K]): Self

    Creates maybe a new Self with all the specified parameters in the Query.

    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.

    Definition Classes
    QueryOps

Inherited from Renderable

Inherited from QueryOps

Inherited from AnyRef

Inherited from Any

Ungrouped