slick.dbio

package slick.dbio

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

Attributes

Members list

Concise view

Type members

Classlikes

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

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

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class AndThenAction[R, +S <: NoStream, -E <: Effect](as: IndexedSeq[DBIOAction[Any, NoStream, E]]) extends DBIOAction[R, S, E]

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

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

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait DBIOAction[R, S, E]
trait Dumpable
class Object
trait Matchable
class Any
case class AsTryAction[+R, -E <: Effect](a: DBIOAction[R, NoStream, E]) extends DBIOAction[Try[R], NoStream, E]

A DBIOAction that represents an asTry operation.

A DBIOAction that represents an asTry operation.

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait DBIOAction[Try[R], NoStream, E]
trait Dumpable
class Object
trait Matchable
class Any
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]

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

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

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait DBIOAction[R, S, E]
trait Dumpable
class Object
trait Matchable
class Any
sealed trait DBIOAction[+R, +S <: NoStream, -E <: Effect] extends Dumpable

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

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 type T. For non-streaming DBIOActions it is NoStream.

Companion:
object
Source:
DBIOAction.scala
Graph
Supertypes
trait Dumpable
class Object
trait Matchable
class Any
Known subtypes
class AndThenAction[R, S, E]
class AsTryAction[R, E]
class CleanUpAction[R, S, E]
trait DatabaseAction[R, S, E]
trait BasicAction[R, S, E]
trait BasicStreamingAction[R, T, E]
trait SqlStreamingAction[R, T, E]
trait StreamingInvokerAction[R, T, E]
trait FixedBasicAction[R, S, E]
trait SqlAction[R, S, E]
trait FixedSqlAction[R, S, E]
trait SynchronousDatabaseAction[R, S, C, SC, E]
class SuccessAction[R]
trait Fused[R, S, C, SC, E]
class FusedAndThenAction[R, S, C, SC, E]
class FailedAction[E]
class FlatMapAction[R, S, P, E]
class FutureAction[R]
class NamedAction[R, S, E]
class SequenceAction[R, R2, E]
object DBIOAction

Attributes

Companion:
trait
Source:
DBIOAction.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait DatabaseAction[+R, +S <: NoStream, -E <: Effect] extends DBIOAction[R, S, E]

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

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

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
trait DBIOAction[R, S, E]
trait Dumpable
class Object
trait Matchable
class Any
Known subtypes
trait BasicAction[R, S, E]
trait BasicStreamingAction[R, T, E]
trait SqlStreamingAction[R, T, E]
trait StreamingInvokerAction[R, T, E]
trait FixedBasicAction[R, S, E]
trait SqlAction[R, S, E]
trait FixedSqlAction[R, S, E]
trait SynchronousDatabaseAction[R, S, C, SC, E]
class SuccessAction[R]
trait Fused[R, S, C, SC, E]
class FusedAndThenAction[R, S, C, SC, E]
trait Effect

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

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

Attributes

Companion:
object
Source:
Effect.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Read
trait All
trait Schema
trait Write
object Effect

Attributes

Companion:
trait
Source:
Effect.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Effect.type
case class FailedAction[-E <: Effect](a: DBIOAction[_, NoStream, E]) extends DBIOAction[Throwable, NoStream, E]

A DBIOAction that represents a failed operation.

A DBIOAction that represents a failed operation.

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait DBIOAction[Throwable, NoStream, E]
trait Dumpable
class Object
trait Matchable
class Any

A DBIOAction that fails.

A DBIOAction that fails.

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait DatabaseAction[Nothing, NoStream, Effect]
trait DBIOAction[Nothing, NoStream, Effect]
trait Dumpable
class Object
trait Matchable
class Any
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]

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

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

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait DBIOAction[R, S, E]
trait Dumpable
class Object
trait Matchable
class Any
case class FutureAction[+R](f: Future[R]) extends DBIOAction[R, NoStream, Effect]

An asynchronous DBIOAction that returns the result of a Future.

An asynchronous DBIOAction that returns the result of a Future.

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Dumpable
class Object
trait Matchable
class Any
case class NamedAction[+R, +S <: NoStream, -E <: Effect](a: DBIOAction[R, S, E], name: String) extends DBIOAction[R, S, E]

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

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

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait DBIOAction[R, S, E]
trait Dumpable
class Object
trait Matchable
class Any
sealed trait NoStream

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.

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.

Attributes

Source:
NoStream.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Streaming[T]
case class SequenceAction[R, +R2, -E <: Effect](as: IndexedSeq[DBIOAction[R, NoStream, E]])(implicit cbf: Factory[R, R2]) extends DBIOAction[R2, NoStream, E]

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

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

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait DBIOAction[R2, NoStream, E]
trait Dumpable
class Object
trait Matchable
class Any
sealed trait Streaming[+T] extends NoStream

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

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

Attributes

Source:
NoStream.scala
Graph
Supertypes
trait NoStream
class Object
trait Matchable
class Any

An ActionContext with extra functionality required for streaming DBIOActions.

An ActionContext with extra functionality required for streaming DBIOActions.

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

A DBIOAction that returns a constant value.

A DBIOAction that returns a constant value.

Attributes

Source:
DBIOAction.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Dumpable
class Object
trait Matchable
class Any

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.

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.

Attributes

Companion:
object
Source:
DBIOAction.scala
Graph
Supertypes
trait DatabaseAction[R, S, E]
trait DBIOAction[R, S, E]
trait Dumpable
class Object
trait Matchable
class Any
Known subtypes
Self type

Attributes

Companion:
trait
Source:
DBIOAction.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Types

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

Simplified type for a DBIOAction without streaming or effect tracking

Simplified type for a DBIOAction without streaming or effect tracking

Attributes

Source:
package.scala
type StreamingDBIO[+R, +T] = DBIOAction[R, Streaming[T], All]

Simplified type for a streaming DBIOAction without effect tracking

Simplified type for a streaming DBIOAction without effect tracking

Attributes

Source:
package.scala

Value members

Concrete fields

val DBIO: DBIOAction.type

Attributes

Source:
package.scala