Packages

sealed trait QueryResult[-In, +Out] extends Serializable

Represents the result of executing a query. It's the result type of the following methods:

1. Collecting query results into a list

val query: Query[From[Person], PeopleStatistics]] = ???

val result = query.toList

2. Printing query results into the console

val query: Query[From[Person], PeopleStatistics]] = ???

val result = query.show(truncate = false)

3. Creating predicates that could be used in other queries

def hasAdults(faculty: Faculty) =
  select[Student]
    .where(_.faculty == faculty.name)
    .exists(_.age >= 18)

select[Faculty].whereSubQuery(hasAdults)
In

input type

Out

query result type

Linear Supertypes
Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. QueryResult
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. def flatMap[In2 <: In, B](f: (Out) => QueryResult[In2, B]): QueryResult[In2, B]

    Transforms this QueryResult by applying a function producing other QueryResult

    Transforms this QueryResult by applying a function producing other QueryResult

    Example:

    val peopleQuery: Query[From[Person], Person] = ???
    val companiesQuery: Query[From[Company], Company] = ???
    
    val result = for {
      people <- peopleQuery.toList
      companies <- companiesQuery.toList
    } yield (people, companies)
    B

    new query result type

    f

    transformation function

    returns

    transformed query result

  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def map[B](f: (Out) => B): QueryResult[In, B]

    Transforms this QueryResult by applying an arbitrary function.

    Transforms this QueryResult by applying an arbitrary function.

    Example:

    val result = select[Person].toList
    val result2 = result.map(_.size)
    B

    new query result type

    f

    transformation function

    returns

    transformed query result

  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped