Packages

t

slick.basic.BasicBackend

BasicDatabaseDef

trait BasicDatabaseDef extends Closeable

A database instance to which connections can be created.

Self Type
Database
Source
BasicBackend.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BasicDatabaseDef
  2. Closeable
  3. AutoCloseable
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def close(): Unit

    Free all resources allocated by Slick for this Database, blocking the current thread until everything has been shut down.

    Free all resources allocated by Slick for this Database, blocking the current thread until everything has been shut down.

    Backend implementations which are based on a naturally blocking shutdown procedure can simply implement this method and get shutdown as an asynchronous wrapper for free. If the underlying shutdown procedure is asynchronous, you should implement shutdown instead and wrap it with Await.result in this method.

    Definition Classes
    BasicDatabaseDef → Closeable → AutoCloseable
  2. abstract def createDatabaseActionContext[T](_useSameThread: Boolean): Context

    Create the default DatabaseActionContext for this backend.

    Create the default DatabaseActionContext for this backend.

    Attributes
    protected[this]
  3. abstract def createSession(): Session

    Create a new session.

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

  4. abstract def createStreamingDatabaseActionContext[T](s: Subscriber[_ >: T], useSameThread: Boolean): StreamingContext

    Create the default StreamingDatabaseActionContext for this backend.

    Create the default StreamingDatabaseActionContext for this backend.

    Attributes
    protected[this]
  5. abstract def synchronousExecutionContext: ExecutionContext

    Return the default ExecutionContext for this Database which should be used for running SynchronousDatabaseActions for asynchronous execution.

    Return the default ExecutionContext for this Database which should be used for running SynchronousDatabaseActions for asynchronous execution.

    Attributes
    protected[this]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef toany2stringadd[BasicDatabaseDef] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (BasicDatabaseDef, B)
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef toArrowAssoc[BasicDatabaseDef] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def acquireSession(ctx: Context): Unit

    Within a synchronous execution, ensure that a Session is available.

    Within a synchronous execution, ensure that a Session is available.

    Attributes
    protected[this]
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  9. def createPublisher[T](a: DBIOAction[_, Streaming[T], Nothing], createCtx: (Subscriber[_ >: T]) => StreamingContext): DatabasePublisher[T]

    Create a Reactive Streams Publisher using the given context factory.

    Create a Reactive Streams Publisher using the given context factory.

    Attributes
    protected[this]
  10. def ensuring(cond: (BasicDatabaseDef) => Boolean, msg: => Any): BasicDatabaseDef
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef toEnsuring[BasicDatabaseDef] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (BasicDatabaseDef) => Boolean): BasicDatabaseDef
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef toEnsuring[BasicDatabaseDef] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: => Any): BasicDatabaseDef
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef toEnsuring[BasicDatabaseDef] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): BasicDatabaseDef
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef toEnsuring[BasicDatabaseDef] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def logAction(a: DBIOAction[_, NoStream, Nothing], ctx: Context): Unit
    Attributes
    protected[this]
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  23. def prioritizedRunnable(priority: => Priority, run: (SetConnectionReleased) => Unit): PrioritizedRunnable
    Attributes
    protected
  24. final def releaseSession(ctx: Context, handleCloseError: PartialFunction[Throwable, Unit] = PartialFunction.empty): Unit

    Within a synchronous execution, close the current Session unless it is pinned.

    Within a synchronous execution, close the current Session unless it is pinned.

    handleCloseError

    What to do with non-fatal errors that arise while closing the Session.

    Attributes
    protected[this]
  25. final def run[R](a: DBIOAction[R, NoStream, Nothing]): Future[R]

    Run an Action asynchronously and return the result as a Future.

  26. def runInContext[R](a: DBIOAction[R, NoStream, Nothing], ctx: Context, streaming: Boolean, topLevel: Boolean): Future[R]

    Run an Action in an existing DatabaseActionContext.

    Run an Action in an existing DatabaseActionContext. This method can be overridden in subclasses to support new DatabaseActions which cannot be expressed through SynchronousDatabaseAction.

    streaming

    Whether to return the result as a stream. In this case, the context must be a StreamingDatabaseActionContext and the Future result should be completed with null or failed after streaming has finished. This method should not call any Subscriber method other than onNext.

    Attributes
    protected[this]
  27. def runSynchronousDatabaseAction[R](a: SynchronousDatabaseAction[R, NoStream, Context, StreamingContext, _], ctx: Context, continuation: Boolean): Future[R]

    Run a SynchronousDatabaseAction on this database.

    Run a SynchronousDatabaseAction on this database.

    Attributes
    protected[this]
  28. def scheduleSynchronousStreaming(a: SynchronousDatabaseAction[_, _ <: NoStream, Context, StreamingContext, _ <: Effect], ctx: StreamingContext, continuation: Boolean)(initialState: StreamState): Unit

    Stream a part of the results of a SynchronousDatabaseAction on this database.

    Stream a part of the results of a SynchronousDatabaseAction on this database.

    Attributes
    protected[BasicBackend]
  29. def shutdown: Future[Unit]

    Free all resources allocated by Slick for this Database.

    Free all resources allocated by Slick for this Database. This is done asynchronously, so you need to wait for the returned Future to complete in order to ensure that everything has been shut down.

  30. final def stream[T](a: DBIOAction[_, Streaming[T], Nothing]): DatabasePublisher[T]

    Create a Publisher for Reactive Streams which, when subscribed to, will run the specified DBIOAction and return the result directly as a stream without buffering everything first.

    Create a Publisher for Reactive Streams which, when subscribed to, will run the specified DBIOAction and return the result directly as a stream without buffering everything first. This method is only supported for streaming actions.

    The Publisher itself is just a stub that holds a reference to the action and this Database. The action does not actually start to run until the call to onSubscribe returns, after which the Subscriber is responsible for reading the full response or cancelling the Subscription. The created Publisher can be reused to serve a multiple Subscribers, each time triggering a new execution of the action.

    For the purpose of combinators such as cleanup which can run after a stream has been produced, cancellation of a stream by the Subscriber is not considered an error. For example, there is no way for the Subscriber to cause a rollback when streaming the results of someQuery.result.transactionally.

    When using a JDBC back-end, all onNext calls are done synchronously and the ResultSet row is not advanced before onNext returns. This allows the Subscriber to access LOB pointers from within onNext. If streaming is interrupted due to back-pressure signaling, the next row will be prefetched (in order to buffer the next result page from the server when a page boundary has been reached).

  31. def streamSynchronousDatabaseAction(a: SynchronousDatabaseAction[_, _ <: NoStream, Context, StreamingContext, _ <: Effect], ctx: StreamingContext, continuation: Boolean): Future[Null]

    Stream a SynchronousDatabaseAction on this database.

    Stream a SynchronousDatabaseAction on this database.

    Attributes
    protected[this]
  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  36. 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 toStringFormat[BasicDatabaseDef] 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, B)
    Implicit
    This member is added by an implicit conversion from BasicDatabaseDef toArrowAssoc[BasicDatabaseDef] 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 Closeable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromBasicDatabaseDef to any2stringadd[BasicDatabaseDef]

Inherited by implicit conversion StringFormat fromBasicDatabaseDef to StringFormat[BasicDatabaseDef]

Inherited by implicit conversion Ensuring fromBasicDatabaseDef to Ensuring[BasicDatabaseDef]

Inherited by implicit conversion ArrowAssoc fromBasicDatabaseDef to ArrowAssoc[BasicDatabaseDef]

Ungrouped