Packages

t

slick.basic.BasicBackend

BasicDatabaseDef

trait BasicDatabaseDef[F[_]] extends AnyDatabaseDef

A database instance to which connections can be created.

F[_] is the effect type (e.g. cats.effect.IO). All run and stream calls on a given database instance use the same effect type.

Concrete subclasses supply:

  • asyncF
  • controls (admission control + connection arbiter)
Self Type
Database[F]
Source
BasicBackend.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BasicDatabaseDef
  2. AnyDatabaseDef
  3. Closeable
  4. AutoCloseable
  5. AnyRef
  6. Any
Implicitly
  1. by StringFormat
  2. by Ensuring
  3. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract val actionListener: ActionListener[F]
  2. implicit abstract val asyncF: Async[F]
  3. abstract def close(): Unit

    Free all resources allocated by Slick for this Database.

    Free all resources allocated by Slick for this Database.

    Implementations must be idempotent (safe to call more than once) and thread-safe (safe to call concurrently from multiple threads). A second or concurrent call must not throw an exception and must not corrupt the state of any remaining resources.

    Definition Classes
    BasicDatabaseDef → Closeable → AutoCloseable
  4. abstract val controls: Controls[F]

    Concurrency controls for admission and connection-slot arbitration.

  5. abstract def createSession(): Session

    Create a new session.

    Create a new session. The session needs to be closed explicitly by calling its close() method.

    Definition Classes
    BasicDatabaseDefAnyDatabaseDef
  6. abstract def sessionAsContext(session: Session, state: ExecState): Context

    Wrap a Session and ExecState as a Context for passing to SynchronousDatabaseAction.run.

    Wrap a Session and ExecState as a Context for passing to SynchronousDatabaseAction.run.

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def ->[B](y: B): (BasicDatabaseDef[F], B)
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef[F] toArrowAssoc[BasicDatabaseDef[F]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def admissionControl: AdmissionControl[F]
    Attributes
    protected
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  8. def commitTransaction(session: Session, previousIsolationLevel: Option[Int]): Unit

    Commit the transaction on the session, restoring the given isolation level if provided.

    Commit the transaction on the session, restoring the given isolation level if provided. Override in JdbcBackend.

    Attributes
    protected
  9. final def connectionArbiter: ConnectionArbiter[F]
    Attributes
    protected
  10. final def controlStatus: F[ControlStatus]
  11. def ensuring(cond: (BasicDatabaseDef[F]) => Boolean, msg: => Any): BasicDatabaseDef[F]
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef[F] toEnsuring[BasicDatabaseDef[F]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (BasicDatabaseDef[F]) => Boolean): BasicDatabaseDef[F]
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef[F] toEnsuring[BasicDatabaseDef[F]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean, msg: => Any): BasicDatabaseDef[F]
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef[F] toEnsuring[BasicDatabaseDef[F]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): BasicDatabaseDef[F]
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef[F] toEnsuring[BasicDatabaseDef[F]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  19. def interpret[R](a: DBIOAction[R, NoStream, Nothing], ctx: Ref[F, ExecState]): F[R]

    The core recursive interpreter for DBIOAction values.

    The core recursive interpreter for DBIOAction values.

    - SynchronousDatabaseAction steps run in F.blocking on the CE3 blocking pool. - No explicit stack-level tracking: CE3 flatMap is stack-safe. - Execution state (session, transaction depth, pinning) is tracked in a Ref[F, ExecState]. - Cancellation triggers rollback via guaranteeCase.

    Attributes
    protected
  20. def interpretStream[T](a: DBIOAction[_, Streaming[T], Nothing], ctx: Ref[F, ExecState]): F[(CloseableIterator[T], (Option[Throwable]) => F[Unit])]
    Attributes
    protected
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  25. def rollbackTransaction(session: Session, previousIsolationLevel: Option[Int]): Unit

    Rollback the transaction on the session, restoring the given isolation level if provided.

    Rollback the transaction on the session, restoring the given isolation level if provided. Override in JdbcBackend.

    Attributes
    protected
  26. final def run[R](a: DBIOAction[R, NoStream, Nothing]): F[R]

    Run a DBIOAction and return the result in F[R].

  27. def setupTransaction(session: Session, isolationLevel: Option[Int]): Option[Int]

    Set up a transaction on a freshly-acquired connection.

    Set up a transaction on a freshly-acquired connection. Returns the previous isolation level (to be restored after the transaction ends), or None if the isolation level was not changed. Override in JdbcBackend.

    Attributes
    protected
  28. final def stream[T](a: DBIOAction[_, Streaming[T], Nothing]): Resource[F, Iterator[T]]

    Open a streaming DBIOAction as a Resource-backed Iterator.

    Open a streaming DBIOAction as a Resource-backed Iterator.

    Finalizer order is: 1) iterator.close() 2) transactional / pin-scope cleanup 3) session / permit release 4) inflight-release

  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef[F] toStringFormat[BasicDatabaseDef[F]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (BasicDatabaseDef[F], B)
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef[F] toArrowAssoc[BasicDatabaseDef[F]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyDatabaseDef

Inherited from Closeable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion StringFormat fromBasicDatabaseDef[F] to StringFormat[BasicDatabaseDef[F]]

Inherited by implicit conversion Ensuring fromBasicDatabaseDef[F] to Ensuring[BasicDatabaseDef[F]]

Inherited by implicit conversion ArrowAssoc fromBasicDatabaseDef[F] to ArrowAssoc[BasicDatabaseDef[F]]

Ungrouped