Trait

co.actioniq.luna.dao

DAO

Related Doc: package dao

Permalink

trait DAO[T <: Table[V, I, P], V <: IdModel[I], I <: IdType, P <: JdbcProfile] extends DAOAction[T, V, I, P]

Top of the DAO traits, this actually runs the actions in a transaction. Most functions return a twitter future

T

slick table, extends aiqtable

V

case class to store result set rows

I

id type (option long and uuid)

Linear Supertypes
DAOAction[T, V, I, P], DAOActionValidate[V], DAOHook[V], DAOQuery[T, V, I, P], IdQuery[T, V, I, P], DefaultFilter[T, V, I, P], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DAO
  2. DAOAction
  3. DAOActionValidate
  4. DAOHook
  5. DAOQuery
  6. IdQuery
  7. DefaultFilter
  8. AnyRef
  9. 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 addCreateTransaction(id: I, input: V): Unit

    Permalink

    Add to transaction log a create operation

    Add to transaction log a create operation

    id

    id of object

    input

    input

    Attributes
    protected
    Definition Classes
    DAOAction
  2. abstract def addDeleteTransaction(id: I, original: V): Unit

    Permalink

    Add to transaction log a delete operation

    Add to transaction log a delete operation

    id

    id of object

    original

    original object

    Attributes
    protected
    Definition Classes
    DAOAction
  3. abstract def addUpdateTransaction(id: I, input: V, original: V): Unit

    Permalink

    Add to transaction log an update operation

    Add to transaction log an update operation

    id

    id of object

    input

    new object

    original

    original object

    Attributes
    protected
    Definition Classes
    DAOAction
  4. 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
  5. abstract val db: DBWithLogging

    Permalink
    Attributes
    protected
  6. implicit abstract val ec: ExecutionContext

    Permalink
    Attributes
    protected
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. abstract def nameSingle: String

    Permalink
    Definition Classes
    DAOQuery
  15. abstract val profile: JdbcProfile

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

    Permalink
    Attributes
    protected
    Definition Classes
    DefaultFilter
  17. abstract def validateCreate(input: V)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[FormValidatorMessageSeq, slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    Validate create

    Validate create

    input

    input to validate

    returns

    DBIOAction of FormValidatorMessageSeq

    Definition Classes
    DAOActionValidate
  18. abstract def validateUpdate(input: V, original: V)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[FormValidatorMessageSeq, slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    Validate an update

    Validate an update

    input

    input to validate

    original

    original object

    returns

    DBIOAction of FormValidatorMessageSeq

    Definition Classes
    DAOActionValidate

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 createAction(input: V, validationInput: (V) ⇒ slick.jdbc.JdbcProfile.API.DBIOAction[FormValidatorMessageSeq, slick.jdbc.JdbcProfile.API.NoStream, Read])(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[I, slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform action to create a single object

    Perform action to create a single object

    input

    object to create

    validationInput

    run validation function

    returns

    ID of object inserted or failure with exception

    Attributes
    protected
    Definition Classes
    DAOAction
  12. def createAction(input: V, toValidate: Boolean = true)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[I, slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform action to create a single object

    Perform action to create a single object

    input

    object to create

    toValidate

    run validation on input using default validator

    returns

    ID of object inserted or failure with exception

    Attributes
    protected
    Definition Classes
    DAOAction
  13. def createAction(inputs: Seq[V], validationInput: (V) ⇒ slick.jdbc.JdbcProfile.API.DBIOAction[FormValidatorMessageSeq, slick.jdbc.JdbcProfile.API.NoStream, Read])(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Seq[I], slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform action to create objects

    Perform action to create objects

    inputs

    sequence of inputs

    validationInput

    run validation function

    returns

    sequence of ids or failure with exception

    Attributes
    protected
    Definition Classes
    DAOAction
  14. def createAction(inputs: Seq[V], toValidate: Boolean)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Seq[I], slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform action to create objects

    Perform action to create objects

    inputs

    sequence of inputs

    toValidate

    run validation on inputs using default validator

    returns

    sequence of ids or failure with exception

    Attributes
    protected
    Definition Classes
    DAOAction
  15. def createAndReadFuture(input: Seq[V]): Future[Seq[V]]

    Permalink

    Run a create on multiple objects in trx and return objects

    Run a create on multiple objects in trx and return objects

    input

    seq of objects to save

    returns

    future of seq of objects saved

  16. def createAndReadFuture(input: V): Future[V]

    Permalink

    Run a create and return object

    Run a create and return object

    input

    model to create

    returns

    future of object persisted

  17. def createFuture(input: Seq[V]): Future[Seq[I]]

    Permalink

    Run a create on multiple objects in trx

    Run a create on multiple objects in trx

    input

    sequence of models

    returns

    future of set of ids

  18. def createFuture(input: V): Future[I]

    Permalink

    Run a create

    Run a create

    input

    model to create

    returns

    future of id

  19. def deleteAction(inputIds: Seq[I])(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Seq[Int], slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform a delete action on a seq of values

    Perform a delete action on a seq of values

    inputIds

    ids of objects to delete

    returns

    number of rows deleted for each input

    Attributes
    protected
    Definition Classes
    DAOAction
  20. def deleteAction(inputId: I)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Int, slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform a delete action

    Perform a delete action

    inputId

    id of object to delete

    returns

    number of rows deleted or failure with exception

    Attributes
    protected
    Definition Classes
    DAOAction
  21. def deleteFuture(inputIds: Seq[I]): Future[Seq[Int]]

    Permalink

    Run a delete

    Run a delete

    inputIds

    seq of object ids

    returns

    future of number of rows updated

  22. def deleteFuture(inputId: I): Future[Int]

    Permalink

    Run a delete

    Run a delete

    inputId

    object id

    returns

    future of number of rows updated

  23. 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

    Definition Classes
    DAOQuery
  24. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  33. 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

    Definition Classes
    DAOQuery
  34. 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
    Definition Classes
    DAOQuery
  35. 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

    Definition Classes
    DAOQuery
  36. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  39. implicit def optLongCompare(e: slick.jdbc.JdbcProfile.API.Rep[DbLongOptId]): OptLongCompare

    Permalink
  40. def processPostCreate(input: V): V

    Permalink
    Definition Classes
    DAOHook
  41. def processPostUpdate(input: V): V

    Permalink
    Definition Classes
    DAOHook
  42. def processPreCreate(input: V): V

    Permalink
    Definition Classes
    DAOHook
  43. def processPreUpdate(input: V, original: Option[V]): V

    Permalink
    Definition Classes
    DAOHook
  44. def queryAndUpdateFuture(queryOps: (QueryWithFilter) ⇒ QueryWithFilter, updateFn: (Seq[V]) ⇒ Seq[V]): Future[Seq[I]]

    Permalink

    Run an update on a sequence and return persisted object

    Run an update on a sequence and return persisted object

    updateFn

    a function that updates the object

    returns

    future of object persisted

  45. def readAction(extraQueryOps: (QueryWithFilter) ⇒ QueryWithFilter = (query) => query)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Seq[V], slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    Perform read action

    Perform read action

    extraQueryOps

    extra query params

    Attributes
    protected
    Definition Classes
    DAOAction
  46. def readByIdAction(id: Set[I])(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Seq[V], slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    Perform action to read objects by set of ids

    Perform action to read objects by set of ids

    id

    set of ids

    returns

    sequence of objects

    Attributes
    protected
    Definition Classes
    DAOAction
  47. def readByIdAction(id: I)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Option[V], slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    Perform action to read object by id

    Perform action to read object by id

    id

    id of object

    returns

    Option of object

    Attributes
    protected
    Definition Classes
    DAOAction
  48. def readByIdFuture(id: Set[I]): Future[Seq[V]]

    Permalink

    Run a read by set of ids

    Run a read by set of ids

    id

    set of ids

    returns

    future of seq of model

  49. def readByIdFuture(id: I): Future[Option[V]]

    Permalink

    Run a read by id

    Run a read by id

    id

    object id

    returns

    Future of option of model

  50. 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

    Definition Classes
    DAOQuery
  51. 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

    Definition Classes
    DAOQuery
  52. def readByIdRequiredAction(id: Set[I])(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Seq[V], slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    Perform action to read object by set of ids, throw exception if any not found

    Perform action to read object by set of ids, throw exception if any not found

    id

    set of ids

    returns

    dbioaction of sequence of model or failure with SlickException

    Attributes
    protected
    Definition Classes
    DAOAction
    Exceptions thrown

    DAOException if any id is invalid

  53. def readByIdRequiredAction(id: I)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[V, slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    Perform action to read object by id, throw exception if not found

    Perform action to read object by id, throw exception if not found

    id

    id of object

    returns

    dbioaction of model or failure with SlickException

    Attributes
    protected
    Definition Classes
    DAOAction
  54. def readByIdRequiredFuture(id: Set[I]): Future[Seq[V]]

    Permalink

    Run a read by set of ids requiring ids exist

    Run a read by set of ids requiring ids exist

    id

    set of object ids

    returns

    future of seq of models

  55. def readByIdRequiredFuture(id: I): Future[V]

    Permalink

    Run a read by id requiring id to exist

    Run a read by id requiring id to exist

    id

    object id

    returns

    future of model

  56. def readFuture(extraQueryOps: (QueryWithFilter) ⇒ QueryWithFilter = (query) => query): Future[Seq[V]]

    Permalink

    Run a read

    Run a read

    extraQueryOps

    extra filters / limits

    returns

    future of seq of model

  57. def readJoinAction[A <: Table[B, C, P], B <: IdModel[C], C <: IdType](other: DAOAction[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): slick.jdbc.JdbcProfile.API.DBIOAction[Seq[(V, B)], slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    Perform read with join

    Perform read with join

    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

    action of join query

    Attributes
    protected
    Definition Classes
    DAOAction
  58. def readJoinActionTwo[A <: Table[B, C, P], B <: IdModel[C], C <: IdType, AA <: Table[BB, CC, P], BB <: IdModel[CC], CC <: IdType](otherFirst: DAOAction[A, B, C, P], onFirst: (T, A) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]], otherSecond: DAOAction[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] = ...)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Seq[(V, B, BB)], slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink
    Attributes
    protected
    Definition Classes
    DAOAction
  59. def readJoinFuture[A <: Table[B, C, P], B <: IdModel[C], C <: IdType](other: DAO[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): Future[Seq[(V, B)]]

    Permalink

    Run a join

    Run a join

    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

    Future of Seq of (mine, theirs)

  60. def readJoinTwoFuture[A <: Table[B, C, P], B <: IdModel[C], C <: IdType, AA <: Table[BB, CC, P], BB <: IdModel[CC], CC <: IdType](otherFirst: DAO[A, B, C, P], onFirst: (T, A) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]], otherSecond: DAO[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] = ...): Future[Seq[(V, B, BB)]]

    Permalink
  61. def readLeftJoinAction[A <: Table[B, C, P], B <: IdModel[C], C <: IdType](other: DAOAction[A, B, C, P], on: (T, A) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]], extraQueryOps: (QueryLeftJoin[A, B]) ⇒ QueryLeftJoin[A, B] = ...): slick.jdbc.JdbcProfile.API.DBIOAction[Seq[(V, Option[B])], slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    Perform read with left join

    Perform read with left join

    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

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

    Attributes
    protected
    Definition Classes
    DAOAction
  62. def readLeftJoinFuture[A <: Table[B, C, P], B <: IdModel[C], C <: IdType](other: DAO[A, B, C, P], on: (T, A) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]]): Future[Seq[(V, Option[B])]]

    Permalink

    Run a left join

    Run a left join

    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

    returns

    future of Seq of (min, option(theirs))

  63. 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.

    Definition Classes
    DAOQuery
  64. def readWithChildAction[A <: Table[B, C, P], B <: IdModel[C], C <: IdType, Z](other: DAOAction[A, B, C, P], filterChildOn: (Seq[V], A) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]], merge: (Seq[V], Seq[B]) ⇒ Seq[Z], extraQueryOps: (QueryWithFilter) ⇒ QueryWithFilter = (query) => query)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Seq[Z], slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    Perform a read with child table results.

    Perform a read with child table results. Think many to many relationships. This actually runs a query to get results from the "parent", uses that to generate a query for "children", and then merge the data together

    A

    type of other slick table

    B

    type of other slick model

    C

    type of other idtype

    Z

    return type, typically Seq[(A, Seq[B])]

    other

    other DAO that is "child"

    filterChildOn

    lambda function to filter "child" table on

    merge

    function to merge both resultsets

    extraQueryOps

    any extra query params for parent table

    Attributes
    protected
    Definition Classes
    DAOAction
  65. def readWithChildFuture[A <: Table[B, C, P], B <: IdModel[C], C <: IdType, Z](other: DAO[A, B, C, P], filterChildOn: (Seq[V], A) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]], merge: (Seq[V], Seq[B]) ⇒ Seq[Z], extraQueryOps: (QueryWithFilter) ⇒ QueryWithFilter = (query) => query): Future[Seq[Z]]

    Permalink

    This function is used for "joining" the results of another DAO with this DAO.

    This function is used for "joining" the results of another DAO with this DAO. It is used for many to many relationships (usually parent to child). It is meant to allow you to have for each row of this DAO, N results from another DAO. Example (this DAO is FlightPlanTable + FlightPlanModel):

    readWithChild[FlightTable, FlightModel, Array[Byte], (FlightPlanModel, Seq[FlightModel])]( other = flightDao, filterChildOn = (flightPlans, flightTable) => { flightTable.flightPlanId inSet flightPlans.map(_.id.get) }, merge = (flightPlans, flights) => { val flightsMap = flights.groupBy(_.flightPlanId) flightPlans.map(plan => (plan, flightsMap.getOrElse(plan.id.get, Seq()))) } )

    A

    other Table

    B

    other Model

    C

    other ID type (String, Long, Array[Byte])

    Z

    return type, for example Seq[(V, Seq[B])]

    other

    the other DAO (child)

    filterChildOn

    lambda function to add a SQL filter to the child DAO. Typical usecase is if you have parent to child relationship, the child dao will filter on child.parent_id in (parent.ids). The parameters are: sequence of parent objects, child table

    merge

    lambda function to merge this DAO's results with the child DAO's results. Typically you would want something like Seq[(ParentModel, Seq[ChildModel])]

    extraQueryOps

    optional extra filters for this DAO

  66. def runTransactionFuture[R](a: slick.jdbc.JdbcProfile.API.DBIOAction[R, slick.jdbc.JdbcProfile.API.NoStream, All]): Future[R]

    Permalink

    Wrapper for running a trx....

    Wrapper for running a trx.... SOON WE CAN PUT SOME AUDIT LOGGING IN

    R

    result type

    a

    DBIOAction

    returns

    result

    Attributes
    protected
  67. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  69. def updateAction(inputs: Seq[V], validationInputOriginal: (NewAndOriginal[V]) ⇒ slick.jdbc.JdbcProfile.API.DBIOAction[FormValidatorMessageSeq, slick.jdbc.JdbcProfile.API.NoStream, Read], originals: Seq[V])(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Seq[I], slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform an update action on a seq of values

    Perform an update action on a seq of values

    inputs

    objects to update, id will be extracted

    validationInputOriginal

    run validation on input using validation function

    returns

    id of object or failure with exceptions

    Attributes
    protected
    Definition Classes
    DAOAction
  70. def updateAction(inputs: Seq[V], toValidate: Boolean, originals: Seq[V])(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Seq[I], slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform an update action on a seq of values

    Perform an update action on a seq of values

    inputs

    objects to update, id will be extracted

    toValidate

    run validation on input

    returns

    id of object or failure with exceptions

    Attributes
    protected
    Definition Classes
    DAOAction
  71. def updateAction(input: V, validationInputOriginal: (NewAndOriginal[V]) ⇒ slick.jdbc.JdbcProfile.API.DBIOAction[FormValidatorMessageSeq, slick.jdbc.JdbcProfile.API.NoStream, Read], inOriginal: Option[V])(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[I, slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform an update action

    Perform an update action

    input

    object to update, id will be extracted

    validationInputOriginal

    run validation on input using validation function

    returns

    id of object or failure with exception

    Attributes
    protected
    Definition Classes
    DAOAction
  72. def updateAction(input: V, toValidate: Boolean, inOriginal: Option[V])(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[I, slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform an update action

    Perform an update action

    input

    object to update, id will be extracted

    toValidate

    run validation on input using default validator

    returns

    id of object or failure with exception

    Attributes
    protected
    Definition Classes
    DAOAction
  73. def updateActionFunctional(original: V, validationInputOriginal: (NewAndOriginal[V]) ⇒ slick.jdbc.JdbcProfile.API.DBIOAction[FormValidatorMessageSeq, slick.jdbc.JdbcProfile.API.NoStream, Read], updateFunction: (V) ⇒ V)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[I, slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform an update action

    Perform an update action

    original

    original object

    validationInputOriginal

    run validation on input using validation function

    updateFunction

    function taking in original object returning an end result object to persist

    returns

    id of object or failure with exception

    Attributes
    protected
    Definition Classes
    DAOAction
  74. def updateActionFunctional(original: V, toValidate: Boolean, updateFunction: (V) ⇒ V)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[I, slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform an update action

    Perform an update action

    original

    original object

    toValidate

    run validation on input using default validator

    updateFunction

    function taking in original object returning an end result object to persist

    returns

    id of object or failure with exception

    Attributes
    protected
    Definition Classes
    DAOAction
  75. def updateActionFunctional(id: I, validationInputOriginal: (NewAndOriginal[V]) ⇒ slick.jdbc.JdbcProfile.API.DBIOAction[FormValidatorMessageSeq, slick.jdbc.JdbcProfile.API.NoStream, Read], updateFunction: (V) ⇒ V)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[I, slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform an update action

    Perform an update action

    id

    id of object

    validationInputOriginal

    run validation on input using validation function

    updateFunction

    function taking in original object returning an end result object to persist

    returns

    id of object or failure with exception

    Attributes
    protected
    Definition Classes
    DAOAction
  76. def updateActionFunctional(id: I, toValidate: Boolean, updateFunction: (V) ⇒ V)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[I, slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    Perform an update action

    Perform an update action

    id

    id of object

    toValidate

    run validation on input using default validator

    updateFunction

    function taking in original object returning an end result object to persist

    returns

    id of object or failure with exception

    Attributes
    protected
    Definition Classes
    DAOAction
  77. def updateAndReadFuture(input: Seq[V]): Future[Seq[V]]

    Permalink

    Run an update on multiple object in a trx and return the persisted objects

    Run an update on multiple object in a trx and return the persisted objects

    input

    seq of models to persist

    returns

    future of seq of objects

  78. def updateAndReadFuture(id: I, updateFn: (V) ⇒ V): Future[V]

    Permalink

    Run an update and return persisted object

    Run an update and return persisted object

    id

    id of object to update

    updateFn

    a function that updates the object

    returns

    future of object persisted

  79. def updateAndReadFuture(input: V): Future[V]

    Permalink

    Run an update and return persisted object

    Run an update and return persisted object

    input

    object to update

    returns

    future of object persisted

  80. def updateFuture(input: Seq[V]): Future[Seq[I]]

    Permalink

    Run an update on multiple objects in a trx

    Run an update on multiple objects in a trx

    input

    seq of models to persist

    returns

    future seq of ids

  81. def updateFuture(input: V): Future[I]

    Permalink

    Run an update

    Run an update

    input

    object to update

    returns

    future of object id

  82. def updateGetId(input: V)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[I, slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    For update action try to get the id from input or throw exception

    For update action try to get the id from input or throw exception

    Attributes
    protected
    Definition Classes
    DAOAction
  83. def updateGetOriginal(id: I)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Option[V], slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    For update action try to get the original

    For update action try to get the original

    id

    id of object

    returns

    Option of the original

    Attributes
    protected
    Definition Classes
    DAOAction
  84. def updateHandleResult(result: slick.jdbc.JdbcProfile.API.DBIOAction[(I, Option[V], V), slick.jdbc.JdbcProfile.API.NoStream, Read with Write])(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[I, slick.jdbc.JdbcProfile.API.NoStream, Read with Write]

    Permalink

    For update action log a transaction on success.

    For update action log a transaction on success. On failure through the correct exception

    result

    result of the chain of actions in update action

    Attributes
    protected
    Definition Classes
    DAOAction
  85. 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

    Definition Classes
    DAOQuery
  86. implicit def uuidCompare(e: slick.jdbc.JdbcProfile.API.Rep[DbUUID]): UUIDCompare

    Permalink
  87. def validateUpdate(newAndOriginal: NewAndOriginal[V])(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[FormValidatorMessageSeq, slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    Validate an input using NewAndOriginal wrapper

    Validate an input using NewAndOriginal wrapper

    newAndOriginal

    wrapper around new and original value

    returns

    DBIOAction of FormValidatorMessageSeq

    Definition Classes
    DAOActionValidate
  88. def validationsToException(results: slick.jdbc.JdbcProfile.API.DBIOAction[FormValidatorMessageSeq, slick.jdbc.JdbcProfile.API.NoStream, Read])(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIOAction[Unit, slick.jdbc.JdbcProfile.API.NoStream, Read]

    Permalink

    Throw exception if validations fails

    Throw exception if validations fails

    results

    DBIOAction of FormValidatorSeq from validation function

    ec

    execution context

    returns

    nothing or failure with FormValidatorExceptions

    Definition Classes
    DAOActionValidate
  89. final def wait(): Unit

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

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

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

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

Inherited from DAOActionValidate[V]

Inherited from DAOHook[V]

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped