Trait

co.actioniq.luna.dao

H2DAO

Related Doc: package dao

Permalink

trait H2DAO[T <: H2DAOTable[V, I], V <: IdModel[I], I <: IdType] extends DAO[T, V, I, H2Profile] with DbImplicits

Linear Supertypes
DbImplicits, JdbcTypes[H2Profile], DAO[T, V, I, H2Profile], DAOAction[T, V, I, H2Profile], DAOActionValidate[V], DAOHook[V], DAOQuery[T, V, I, H2Profile], IdQuery[T, V, I, H2Profile], DefaultFilter[T, V, I, H2Profile], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. H2DAO
  2. DbImplicits
  3. JdbcTypes
  4. DAO
  5. DAOAction
  6. DAOActionValidate
  7. DAOHook
  8. DAOQuery
  9. IdQuery
  10. DefaultFilter
  11. AnyRef
  12. 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
    Definition Classes
    DAO
  6. implicit abstract val ec: ExecutionContext

    Permalink
    Attributes
    protected
    Definition Classes
    DAO
  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: slick.jdbc.H2Profile.DriverJdbcType[A], bTpe: slick.jdbc.H2Profile.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: slick.jdbc.H2Profile.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 slickQuery: slick.jdbc.JdbcProfile.API.TableQuery[T]

    Permalink
    Attributes
    protected
    Definition Classes
    DefaultFilter
  16. 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
  17. 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, _, H2Profile], B <: IdModel[_]](query: QueryJoin[A, B], other: DefaultFilter[A, B, _, H2Profile]): QueryJoin[A, B]

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

    Permalink
    Definition Classes
    DefaultFilter
  8. def applyDefaultFiltersLeftJoin[A <: Table[B, _, H2Profile], 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

    Definition Classes
    DAO
  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

    Definition Classes
    DAO
  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

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

    Permalink

    Run a create

    Run a create

    input

    model to create

    returns

    future of id

    Definition Classes
    DAO
  19. implicit val dbOptLongJdbcType: slick.jdbc.H2Profile.DriverJdbcType[DbLongOptId]

    Permalink
    Attributes
    protected
    Definition Classes
    JdbcTypes
  20. implicit val dbUuidJdbcType: slick.jdbc.H2Profile.DriverJdbcType[DbUUID]

    Permalink
    Attributes
    protected
    Definition Classes
    JdbcTypes
  21. 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
  22. 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
  23. 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

    Definition Classes
    DAO
  24. def deleteFuture(inputId: I): Future[Int]

    Permalink

    Run a delete

    Run a delete

    inputId

    object id

    returns

    future of number of rows updated

    Definition Classes
    DAO
  25. 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
  26. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  35. def joinQuery[A <: Table[B, C, H2Profile], B <: IdModel[C], C <: IdType](other: DAOQuery[A, B, C, H2Profile], 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
  36. def joinQueryTwo[A <: Table[B, C, H2Profile], B <: IdModel[C], C <: IdType, AA <: Table[BB, CC, H2Profile], BB <: IdModel[CC], CC <: IdType](otherFirst: DAOQuery[A, B, C, H2Profile], onFirst: (T, A) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]], otherSecond: DAOQuery[AA, BB, CC, H2Profile], 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
  37. def leftJoinQuery[A <: Table[B, C, H2Profile], B <: IdModel[C], C <: IdType](other: DAOQuery[A, B, C, H2Profile], 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
  38. final def ne(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    DAO
  42. def optLongJdbcType: slick.jdbc.H2Profile.DriverJdbcType[DbLongOptId]

    Permalink
    Definition Classes
    DbImplicitsJdbcTypes
  43. def processPostCreate(input: V): V

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

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

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

    Permalink
    Definition Classes
    DAOHook
  47. val profile: H2Profile.type

    Permalink
    Attributes
    protected
    Definition Classes
    H2DAODAOActionDAOActionValidateDAOQueryIdQueryDefaultFilter
  48. 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

    Definition Classes
    DAO
  49. 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
  50. 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
  51. 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
  52. 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

    Definition Classes
    DAO
  53. 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

    Definition Classes
    DAO
  54. 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
  55. 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
  56. 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

  57. 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
  58. 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

    Definition Classes
    DAO
  59. 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

    Definition Classes
    DAO
  60. 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

    Definition Classes
    DAO
  61. def readJoinAction[A <: Table[B, C, H2Profile], B <: IdModel[C], C <: IdType](other: DAOAction[A, B, C, H2Profile], 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
  62. def readJoinActionTwo[A <: Table[B, C, H2Profile], B <: IdModel[C], C <: IdType, AA <: Table[BB, CC, H2Profile], BB <: IdModel[CC], CC <: IdType](otherFirst: DAOAction[A, B, C, H2Profile], onFirst: (T, A) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]], otherSecond: DAOAction[AA, BB, CC, H2Profile], 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
  63. def readJoinFuture[A <: Table[B, C, H2Profile], B <: IdModel[C], C <: IdType](other: DAO[A, B, C, H2Profile], 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)

    Definition Classes
    DAO
  64. def readJoinTwoFuture[A <: Table[B, C, H2Profile], B <: IdModel[C], C <: IdType, AA <: Table[BB, CC, H2Profile], BB <: IdModel[CC], CC <: IdType](otherFirst: DAO[A, B, C, H2Profile], onFirst: (T, A) ⇒ slick.jdbc.JdbcProfile.API.Rep[Option[Boolean]], otherSecond: DAO[AA, BB, CC, H2Profile], 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
    Definition Classes
    DAO
  65. def readLeftJoinAction[A <: Table[B, C, H2Profile], B <: IdModel[C], C <: IdType](other: DAOAction[A, B, C, H2Profile], 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
  66. def readLeftJoinFuture[A <: Table[B, C, H2Profile], B <: IdModel[C], C <: IdType](other: DAO[A, B, C, H2Profile], 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))

    Definition Classes
    DAO
  67. 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
  68. def readWithChildAction[A <: Table[B, C, H2Profile], B <: IdModel[C], C <: IdType, Z](other: DAOAction[A, B, C, H2Profile], 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
  69. def readWithChildFuture[A <: Table[B, C, H2Profile], B <: IdModel[C], C <: IdType, Z](other: DAO[A, B, C, H2Profile], 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

    Definition Classes
    DAO
  70. 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
    Definition Classes
    DAO
  71. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  73. 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
  74. 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
  75. 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
  76. 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
  77. 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
  78. 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
  79. 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
  80. 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
  81. 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

    Definition Classes
    DAO
  82. 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

    Definition Classes
    DAO
  83. 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

    Definition Classes
    DAO
  84. 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

    Definition Classes
    DAO
  85. def updateFuture(input: V): Future[I]

    Permalink

    Run an update

    Run an update

    input

    object to update

    returns

    future of object id

    Definition Classes
    DAO
  86. 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
  87. 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
  88. 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
  89. 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
  90. implicit def uuidCompare(e: slick.jdbc.JdbcProfile.API.Rep[DbUUID]): UUIDCompare

    Permalink
    Definition Classes
    DAO
  91. def uuidJdbcType: slick.jdbc.H2Profile.DriverJdbcType[DbUUID]

    Permalink
    Definition Classes
    DbImplicitsJdbcTypes
  92. 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
  93. 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
  94. final def wait(): Unit

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

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

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

Inherited from DbImplicits

Inherited from JdbcTypes[H2Profile]

Inherited from DAO[T, V, I, H2Profile]

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

Inherited from DAOActionValidate[V]

Inherited from DAOHook[V]

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped