Package

slick

dbio

Permalink

package dbio

The dbio package contains the Database I/O Action implementation. See DBIOAction for details.

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. dbio
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait ActionContext extends AnyRef

    Permalink

    The base trait for the context object passed to synchronous database actions by the execution engine.

  2. case class AndThenAction[R, +S <: NoStream, -E <: Effect](as: IndexedSeq[DBIOAction[Any, NoStream, E]]) extends DBIOAction[R, S, E] with Product with Serializable

    Permalink

    A DBIOAction that represents a seq or andThen operation for sequencing in the DBIOAction monad.

    A DBIOAction that represents a seq or andThen operation for sequencing in the DBIOAction monad. Unlike SequenceAction it only keeps the last result.

  3. case class AsTryAction[+R, -E <: Effect](a: DBIOAction[R, NoStream, E]) extends DBIOAction[Try[R], NoStream, E] with Product with Serializable

    Permalink

    A DBIOAction that represents an asTry operation.

  4. case class CleanUpAction[+R, +S <: NoStream, -E <: Effect](base: DBIOAction[R, S, E], f: (Option[Throwable]) ⇒ DBIOAction[_, NoStream, E], keepFailure: Boolean, executor: ExecutionContext) extends DBIOAction[R, S, E] with Product with Serializable

    Permalink

    A DBIOAction that represents a cleanUp operation for sequencing in the DBIOAction monad.

  5. type DBIO[+R] = DBIOAction[R, NoStream, All]

    Permalink

    Simplified type for a DBIOAction without streaming or effect tracking

  6. sealed trait DBIOAction[+R, +S <: NoStream, -E <: Effect] extends Dumpable

    Permalink

    A Database I/O Action that can be executed on a database.

    A Database I/O Action that can be executed on a database. The DBIOAction type allows a separation of execution logic and resource usage management logic from composition logic. DBIOActions can be composed with methods such as andThen, andFinally and flatMap. Individual parts of a composite DBIOAction are always executed serially on a single database, but possibly in different database sessions, unless the session is pinned either explicitly (using withPinnedSession) or implicitly (e.g. through a transaction).

    The actual implementation base type for all Actions is DBIOAction. StreamingDBIO and DBIO are type aliases which discard the effect type (and the streaming result type in the latter case) to make DBIOAction types easier to write when these features are not needed. All primitive DBIOActions and all DBIOActions produced by the standard combinators in Slick have correct Effect types and are streaming (if possible).

    R

    The result type when executing the DBIOAction and fully materializing the result.

    S

    An encoding of the result type for streaming results. If this action is capable of streaming, it is Streaming[T] for an element type T. For non-streaming DBIOActions it is NoStream.

    E

    The DBIOAction's effect type, e.g. Effect.Read with Effect.Write. When composing actions, the correct combined effect type will be inferred. Effects can be used in user code, e.g. to automatically direct all read-only Actions to a slave database and write Actions to the master copy.

  7. trait DatabaseAction[+R, +S <: NoStream, -E <: Effect] extends DBIOAction[R, S, E]

    Permalink

    A DBIOAction that represents a database operation.

    A DBIOAction that represents a database operation. Concrete implementations are backend-specific.

  8. trait Effect extends AnyRef

    Permalink

    A phantom type for annotating DBIOActions with specific effects (e.g.

    A phantom type for annotating DBIOActions with specific effects (e.g. Write or Transactional). Effects can be composed through intersection types (e.g. Write with Transactional. The standard Slick back-ends do not restrict the evaluation of actions based on effects but they can be used in user-level code (e.g. for ensuring that all writes go to a master database but reads can also be performed by a slave).

  9. case class FailedAction[-E <: Effect](a: DBIOAction[_, NoStream, E]) extends DBIOAction[Throwable, NoStream, E] with Product with Serializable

    Permalink

    A DBIOAction that represents a failed operation.

  10. case class FailureAction(t: Throwable) extends SynchronousDatabaseAction[Nothing, NoStream, BasicBackend, Effect] with Product with Serializable

    Permalink

    A DBIOAction that fails.

  11. case class FlatMapAction[+R, +S <: NoStream, P, -E <: Effect](base: DBIOAction[P, NoStream, E], f: (P) ⇒ DBIOAction[R, S, E], executor: ExecutionContext) extends DBIOAction[R, S, E] with Product with Serializable

    Permalink

    A DBIOAction that represents a flatMap operation for sequencing in the DBIOAction monad.

  12. case class FutureAction[+R](f: Future[R]) extends DBIOAction[R, NoStream, Effect] with Product with Serializable

    Permalink

    An asynchronous DBIOAction that returns the result of a Future.

  13. case class NamedAction[+R, +S <: NoStream, -E <: Effect](a: DBIOAction[R, S, E], name: String) extends DBIOAction[R, S, E] with Product with Serializable

    Permalink

    A DBIOAction that attaches a name for logging purposes to another action.

  14. sealed trait NoStream extends AnyRef

    Permalink

    A phantom type used as the streaming result type for DBIOActions that do not support streaming.

    A phantom type used as the streaming result type for DBIOActions that do not support streaming. Note that this is a supertype of Streaming (and it is used in covariant position), so that any streaming action can be used where a non-streaming action is expected.

  15. case class SequenceAction[R, +R2, -E <: Effect](as: IndexedSeq[DBIOAction[R, NoStream, E]])(implicit cbf: scala.collection.compat.Factory[R, R2]) extends DBIOAction[R2, NoStream, E] with Product with Serializable

    Permalink

    A DBIOAction that represents a sequence or operation for sequencing in the DBIOAction monad.

  16. sealed trait Streaming[+T] extends NoStream

    Permalink

    A phantom type used as the streaming result type for DBIOActions that do support streaming.

  17. trait StreamingActionContext extends ActionContext

    Permalink

    An ActionContext with extra functionality required for streaming DBIOActions.

  18. type StreamingDBIO[+R, +T] = DBIOAction[R, Streaming[T], All]

    Permalink

    Simplified type for a streaming DBIOAction without effect tracking

  19. case class SuccessAction[+R](value: R) extends SynchronousDatabaseAction[R, NoStream, BasicBackend, Effect] with Product with Serializable

    Permalink

    A DBIOAction that returns a constant value.

  20. trait SynchronousDatabaseAction[+R, +S <: NoStream, -B <: BasicBackend, -E <: Effect] extends DatabaseAction[R, S, E]

    Permalink

    A synchronous database action provides a function from an ActionContext to the result type.

    A synchronous database action provides a function from an ActionContext to the result type. BasicBackend.DatabaseDef.run supports this kind of action out of the box through BasicBackend.DatabaseDef.runSynchronousDatabaseAction so that run does not need to be extended if all primitive database actions can be expressed in this way. These actions also implement construction-time fusion for the andFinally, andThen, asTry, failed, withPinnedSession and zip operations.

    The execution engine ensures that an ActionContext is never used concurrently and that all state changes performed by one invocation of a SynchronousDatabaseAction are visible to the next invocation of the same or a different SynchronousDatabaseAction.

Value Members

  1. val DBIO: DBIOAction.type

    Permalink
  2. object DBIOAction

    Permalink
  3. object Effect

    Permalink
  4. object SynchronousDatabaseAction

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped