Trait

co.actioniq.luna.dao

DAOQuery

Related Doc: package dao

Permalink

trait DAOQuery[T <: Table[V, I, P], V <: IdModel[I], I <: IdType, P <: JdbcProfile] extends DefaultFilter[T, V, I, P] with IdQuery[T, V, I, P]

Generates the base queries that most DAO classes will need

T

slick table, extends aiqtable

V

case class to store result set rows

I

id type (option long and uuid)

Linear Supertypes
IdQuery[T, V, I, P], DefaultFilter[T, V, I, P], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DAOQuery
  2. IdQuery
  3. DefaultFilter
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type QueryJoin[A, B] = Query[(T, A), (V, B), Seq]

    Permalink
    Attributes
    protected
    Definition Classes
    DefaultFilter
  2. type QueryJoinTwo[A, B, AA, BB] = Query[((T, A), AA), ((V, B), BB), Seq]

    Permalink
    Attributes
    protected
    Definition Classes
    DefaultFilter
  3. type QueryLeftJoin[A, B] = Query[(T, slick.jdbc.JdbcProfile.API.Rep[Option[A]]), (V, Option[B]), Seq]

    Permalink
    Attributes
    protected
    Definition Classes
    DefaultFilter
  4. type QueryWithFilter = Query[T, V, Seq]

    Permalink
    Attributes
    protected
    Definition Classes
    DefaultFilter

Abstract Value Members

  1. abstract def createQuery(input: V)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[I, slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Create a query for creating objects.

    Create a query for creating objects. This query depends on the id type since MySQL can only return ids of autoincs

    input

    new row

    Definition Classes
    IdQuery
  2. abstract def getCompiledQuerySeq[A, B](originalQuery: QueryWithFilter, fieldFunc: (T) ⇒ slick.jdbc.JdbcProfile.API.Rep[I], keyPrefix: String, storage: SlickCompiledFunctionSingleton, ids: Seq[I], field1: (T, slick.jdbc.JdbcProfile.API.Rep[A]) ⇒ slick.jdbc.JdbcProfile.API.Rep[Boolean], field1Value: A, field2: (T, slick.jdbc.JdbcProfile.API.Rep[B]) ⇒ slick.jdbc.JdbcProfile.API.Rep[Boolean], field2Value: B)(implicit aTpe: P.DriverJdbcType[A], bTpe: P.DriverJdbcType[B]): AppliedCompiledFunction[_, _, Seq[V]]

    Permalink

    Get compiled query with input applied.

    Get compiled query with input applied. Adds TWO extra field for filtering

    A

    type of field1

    B

    type of field2

    originalQuery

    baseline query to add IN filter to

    fieldFunc

    lambda to get id field from table

    keyPrefix

    string keyprefix for storing in singleton

    storage

    singleton to store compiled queries

    ids

    to filter the field defined in fieldFunc

    field1

    lambda function to apply first filter for extra field

    field1Value

    value to filter first extra field on

    field2

    lambda function to apply second filter for extra field

    field2Value

    value to filter second extra field on

    aTpe

    implicit way to query type A

    bTpe

    implicit way to query type B

    returns

    applied compiled function

    Definition Classes
    IdQuery
  3. abstract def getCompiledQuerySeq[A](originalQuery: QueryWithFilter, fieldFunc: (T) ⇒ slick.jdbc.JdbcProfile.API.Rep[I], keyPrefix: String, storage: SlickCompiledFunctionSingleton, ids: Seq[I], field1: (T, slick.jdbc.JdbcProfile.API.Rep[A]) ⇒ slick.jdbc.JdbcProfile.API.Rep[Boolean], field1Value: A)(implicit aTpe: P.DriverJdbcType[A]): AppliedCompiledFunction[_, _, Seq[V]]

    Permalink

    Get compiled query with input applied.

    Get compiled query with input applied. Adds extra field for filtering

    A

    type of field1

    originalQuery

    baseline query to add IN filter to

    fieldFunc

    lambda to get id field from table

    keyPrefix

    string keyprefix for storing in singleton

    storage

    singleton to store compiled queries

    ids

    to filter the field defined in fieldFunc

    field1

    lambda function to apply filter for extra field

    field1Value

    value to filter extra field on

    aTpe

    implicit way to query type A

    returns

    applied compiled function

    Definition Classes
    IdQuery
  4. abstract def getCompiledQuerySeq(originalQuery: QueryWithFilter, fieldFunc: (T) ⇒ slick.jdbc.JdbcProfile.API.Rep[I], keyPrefix: String, storage: SlickCompiledFunctionSingleton, ids: Seq[I]): AppliedCompiledFunction[_, _, Seq[V]]

    Permalink

    Get compiled query with input applied

    Get compiled query with input applied

    originalQuery

    baseline query to add IN filter to

    fieldFunc

    lambda to get id field from table

    keyPrefix

    string keyprefix for storing in singleton

    storage

    singleton to store compiled queries

    ids

    ids to filter the field defined in fieldFunc

    returns

    applied compiled function

    Definition Classes
    IdQuery
  5. abstract def idEquals(query: QueryWithFilter, id: I): QueryWithFilter

    Permalink

    Query to filter id = something

    Query to filter id = something

    query

    existing query

    id

    id to filter on

    Definition Classes
    IdQuery
  6. abstract def idInSet(query: QueryWithFilter, ids: Seq[I]): QueryWithFilter

    Permalink

    Query to filter id in (some seq)

    Query to filter id in (some seq)

    query

    existing query

    ids

    ids to filter on

    Definition Classes
    IdQuery
  7. abstract def idMap: slick.jdbc.JdbcProfile.API.Query[slick.jdbc.JdbcProfile.API.Rep[I], I, Seq]

    Permalink

    Retrieve ID column from query

    Retrieve ID column from query

    Definition Classes
    IdQuery
  8. abstract def idsAsSeq(input: Seq[V]): Seq[I]

    Permalink

    Retrieve sequence of ids from sequence of rows

    Retrieve sequence of ids from sequence of rows

    input

    sequence of rows

    Definition Classes
    IdQuery
  9. abstract def nameSingle: String

    Permalink
  10. abstract val profile: JdbcProfile

    Permalink
    Attributes
    protected
    Definition Classes
    DAOQueryIdQueryDefaultFilter
  11. abstract val slickQuery: slick.jdbc.JdbcProfile.API.TableQuery[T]

    Permalink
    Attributes
    protected
    Definition Classes
    DefaultFilter

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addDefaultFilter(filter: (T) ⇒ slick.jdbc.JdbcProfile.API.Rep[Boolean]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    DefaultFilter
  5. def addDefaultOptFilter(filter: (T) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    DefaultFilter
  6. def applyDefaultFilters[A <: Table[B, _, P], B <: IdModel[_]](query: QueryJoin[A, B], other: DefaultFilter[A, B, _, P]): QueryJoin[A, B]

    Permalink
    Definition Classes
    DefaultFilter
  7. def applyDefaultFilters(query: QueryWithFilter): QueryWithFilter

    Permalink
    Definition Classes
    DefaultFilter
  8. def applyDefaultFiltersLeftJoin[A <: Table[B, _, P], B <: IdModel[_]](query: QueryLeftJoin[A, B]): QueryLeftJoin[A, B]

    Permalink
    Definition Classes
    DefaultFilter
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def deleteQuery(id: I): slick.jdbc.JdbcProfile.API.DBIOAction[Int, slick.jdbc.JdbcProfile.API.NoStream, Write]

    Permalink

    Build a delete query

    Build a delete query

    id

    object id to delete

  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def getDefaultFilters(t: T): slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]]

    Permalink
    Definition Classes
    DefaultFilter
  17. def getSlickQuery: slick.jdbc.JdbcProfile.API.TableQuery[T]

    Permalink
    Definition Classes
    DefaultFilter
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. def ifDefaultFiltersExist[R](exists: () ⇒ R, doesNotExist: () ⇒ R): R

    Permalink
    Definition Classes
    DefaultFilter
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def joinQuery[A <: Table[B, C, P], B <: IdModel[C], C <: IdType](other: DAOQuery[A, B, C, P], on: (T, A) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]], extraQueryOps: (QueryJoin[A, B]) ⇒ QueryJoin[A, B] = (query: QueryJoin[A, B]) => query): QueryJoin[A, B]

    Permalink

    Build an inner join query between two daos

    Build an inner join query between two daos

    A

    type of other slick table

    B

    type of other slick model

    C

    type of other idtype

    other

    other DAO to join to

    on

    lambda filter function to specify "on" clause for join

    extraQueryOps

    extra where clause

    returns

    query to do join

  22. def joinQueryTwo[A <: Table[B, C, P], B <: IdModel[C], C <: IdType, AA <: Table[BB, CC, P], BB <: IdModel[CC], CC <: IdType](otherFirst: DAOQuery[A, B, C, P], onFirst: (T, A) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]], otherSecond: DAOQuery[AA, BB, CC, P], onSecond: (T, A, AA) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]], extraQueryOps: (QueryJoinTwo[A, B, AA, BB]) ⇒ QueryJoinTwo[A, B, AA, BB] = ...): QueryJoinTwo[A, B, AA, BB]

    Permalink
  23. def leftJoinQuery[A <: Table[B, C, P], B <: IdModel[C], C <: IdType](other: DAOQuery[A, B, C, P], on: (T, A) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]], extraQueryOps: (QueryLeftJoin[A, B]) ⇒ QueryLeftJoin[A, B] = ...): QueryLeftJoin[A, B]

    Permalink

    Build a left join query between two daos

    Build a left join query between two daos

    A

    type of other slick table

    B

    type of other slick model

    C

    type of other idtype

    other

    other DAO to join to

    on

    lambda filter function to specify "on" clause for join

    extraQueryOps

    extra where clause

    returns

    query to do left join, "other" piece is option to return

  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. def readByIdQuery(id: Set[I]): QueryWithFilter

    Permalink

    Build a read query for a set of ids

    Build a read query for a set of ids

    id

    set of ids

  28. def readByIdQuery(id: I): QueryWithFilter

    Permalink

    Build a read query based on an id

    Build a read query based on an id

    id

    object id

  29. def readQuery: QueryWithFilter

    Permalink

    Build a read query.

    Build a read query. Most query functions will use this as a basis for building their queries so default filters get used throughout. The only exception is joins.

  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. def updateQuery(id: I, input: V)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[I, slick.jdbc.JdbcProfile.API.NoStream, Write]

    Permalink

    Build an update query.

    Build an update query. Return id of object

    id

    object id to update

    input

    new object to store

  33. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from IdQuery[T, V, I, P]

Inherited from DefaultFilter[T, V, I, P]

Inherited from AnyRef

Inherited from Any

Ungrouped