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 '='
- Source
- Query.scala
- Alphabetic
- By Inheritance
- Query
- Renderable
- QueryOps
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+*?[T](values: Seq[T])(implicit arg0: QueryParam[T], arg1: QueryParamEncoder[T]): Self
alias for withQueryParam
alias for withQueryParam
- Definition Classes
- QueryOps
-
def
+*?[T](value: T)(implicit arg0: QueryParam[T], arg1: QueryParamEncoder[T]): Self
alias for withQueryParam
alias for withQueryParam
- Definition Classes
- QueryOps
- def ++(pairs: Iterable[(String, Option[String])]): Query
- def +:(elem: KeyValue): Query
-
def
+?[K, T](name: K, values: Seq[T])(implicit arg0: QueryParamKeyLike[K], arg1: QueryParamEncoder[T]): Self
alias for withQueryParam
alias for withQueryParam
- Definition Classes
- QueryOps
-
def
+?[K](name: K)(implicit arg0: QueryParamKeyLike[K]): Self
alias for withQueryParam
alias for withQueryParam
- Definition Classes
- QueryOps
-
def
+?[K, T](name: K, value: T)(implicit arg0: QueryParamKeyLike[K], arg1: QueryParamEncoder[T]): Self
alias for withQueryParam
alias for withQueryParam
- Definition Classes
- QueryOps
-
def
+?[T](implicit arg0: QueryParam[T]): Self
alias for withQueryParam
alias for withQueryParam
- Definition Classes
- QueryOps
-
def
+??[T](value: Option[T])(implicit arg0: QueryParam[T], arg1: QueryParamEncoder[T]): Self
alias for withOptionQueryParam
alias for withOptionQueryParam
- Definition Classes
- QueryOps
-
def
+??[K, T](name: K, value: Option[T])(implicit arg0: QueryParamKeyLike[K], arg1: QueryParamEncoder[T]): Self
alias for withOptionQueryParam
alias for withOptionQueryParam
- Definition Classes
- QueryOps
-
def
-?[K](key: K)(implicit arg0: QueryParamKeyLike[K]): Self
alias for removeQueryParam
alias for removeQueryParam
- Definition Classes
- QueryOps
-
def
-?[T](implicit key: QueryParam[T]): Self
alias for removeQueryParam
alias for removeQueryParam
- Definition Classes
- QueryOps
- def :+(elem: KeyValue): Query
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
=?[T](q: Map[String, List[T]])(implicit arg0: QueryParamEncoder[T]): Self
alias for setQueryParams
alias for setQueryParams
- Definition Classes
- QueryOps
-
def
?[K](name: K)(implicit arg0: QueryParamKeyLike[K]): Boolean
alias for containsQueryParam
alias for containsQueryParam
- Definition Classes
- QueryOps
- def apply(idx: Int): KeyValue
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
containsQueryParam[K](key: K)(implicit arg0: QueryParamKeyLike[K]): Boolean
- Definition Classes
- QueryOps
-
def
containsQueryParam[T](implicit key: QueryParam[T]): Boolean
Checks if a specified parameter exists in the Query.
- def drop(n: Int): Query
- def dropRight(n: Int): Query
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(that: Any): Boolean
- Definition Classes
- Query → AnyRef → Any
- def exists(f: (KeyValue) ⇒ Boolean): Boolean
- def filter(f: (KeyValue) ⇒ Boolean): Query
- def filterNot(f: (KeyValue) ⇒ Boolean): Query
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- 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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- Query → AnyRef → Any
- def isEmpty: Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def length: Int
-
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. -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonEmpty: Boolean
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def pairs: Vector[KeyValue]
-
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. - val query: Query
-
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 givenkey
exists thenthis
will be returned.- Definition Classes
- QueryOps
-
def
render(writer: Writer): writer.type
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
- Query → Renderable
-
def
renderString: String
Generates a String rendering of this object
Generates a String rendering of this object
- Definition Classes
- Renderable
- def replaceQuery(query: Query): Self
- def self: Self
-
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. - def slice(from: Int, until: Int): Query
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toList: List[(String, Option[String])]
-
def
toString(): String
- Definition Classes
- Renderable → Any
- def toVector: Vector[(String, Option[String])]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
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
-
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. -
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. -
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. -
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. -
def
withQueryParam[K](key: K)(implicit arg0: QueryParamKeyLike[K]): Self
Creates a new
Self
with the specified parameter in the Query. -
def
withQueryParam[T](implicit arg0: QueryParam[T]): Self
Creates a new
Self
with the specified parameter in the Query. -
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