AnyOptionExtensionMethods

slick.lifted.AnyOptionExtensionMethods
final class AnyOptionExtensionMethods[O <: Rep[_], P](val r: O) extends AnyVal

Extension methods for Options of single- and multi-column values

Attributes

Source:
ExtensionMethods.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def filter[T](p: P => T)(implicit wt: CanBeQueryCondition[T]): O

Return this Option if it is non-empty and applying the predicate p to this Option's value returns true. Otherwise, return None.

Return this Option if it is non-empty and applying the predicate p to this Option's value returns true. Otherwise, return None.

Attributes

Source:
ExtensionMethods.scala
def flatMap[QO](f: P => Rep[Option[QO]]): Rep[Option[QO]]

Return the result of applying f to this Option's value if this Option is non-empty, otherwise None.

Return the result of applying f to this Option's value if this Option is non-empty, otherwise None.

Attributes

Source:
ExtensionMethods.scala
def flatten[QO](implicit ev: P <:< Rep[Option[QO]]): Rep[Option[QO]]

Flatten a nested Option.

Flatten a nested Option.

Attributes

Source:
ExtensionMethods.scala
def fold[B, BP](ifEmpty: B)(f: P => B)(implicit shape: Shape[FlatShapeLevel, B, _, BP]): BP

Apply f to the value inside this Option, if it is non-empty, otherwise return ifEmpty.

Apply f to the value inside this Option, if it is non-empty, otherwise return ifEmpty.

Attributes

Source:
ExtensionMethods.scala
def getOrElse[M, P2 <: P](default: M)(implicit shape: Shape[FlatShapeLevel, M, _, P2], ol: OptionLift[P2, O]): Unconst[P, P2]

Get the value inside this Option, if it is non-empty, otherwise the supplied default.

Get the value inside this Option, if it is non-empty, otherwise the supplied default.

Attributes

Source:
ExtensionMethods.scala
def isDefined: Rep[Boolean]

Check if this Option is non-empty.

Check if this Option is non-empty.

Attributes

Source:
ExtensionMethods.scala
def isEmpty: Rep[Boolean]

Check if this Option is empty.

Check if this Option is empty.

Attributes

Source:
ExtensionMethods.scala
def map[Q, QO](f: P => Q)(implicit ol: OptionLift[Q, Rep[Option[QO]]]): Rep[Option[QO]]

Transform the value inside this Option

Transform the value inside this Option

Attributes

Source:
ExtensionMethods.scala
def nonEmpty: Rep[Boolean]

Check if this Option is non-empty.

Check if this Option is non-empty.

Attributes

Source:
ExtensionMethods.scala

Concrete fields

val r: O

Attributes

Source:
ExtensionMethods.scala