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).
Attributes
- 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.- 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 typeT. For non-streaming DBIOActions it isNoStream.- Companion:
- object
- Source:
- DBIOAction.scala
- Graph
- Supertypes
- Known subtypes
- class MutatingResultAction[T]class SimpleJdbcProfileAction[R]class InsertOrUpdateActionclass InsertQueryActionclass MultiInsertActionclass InsertOrUpdateAllActionclass SingleInsertActionclass FailureActionclass SuccessAction[R]class SimpleJdbcAction[R]class SimpleMemoryAction[R]class FailedAction[E]class FutureAction[R]