slick.memory.DistributedBackend

DatabaseDef

class DatabaseDef extends DistributedBackend.DatabaseDef

A database instance to which connections can be created.

Definition Classes
DistributedBackendDatabaseComponent
Source
DistributedBackend.scala
Linear Supertypes
DistributedBackend.DatabaseDef, Closeable, AutoCloseable, AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DatabaseDef
  2. DatabaseDef
  3. Closeable
  4. AutoCloseable
  5. AnyRef
  6. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DatabaseDef(dbs: Vector[backend.DatabaseComponent.DatabaseDef], executionContext: ExecutionContext)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from DatabaseDef to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (DatabaseDef, B)

    Implicit information
    This member is added by an implicit conversion from DatabaseDef to ArrowAssoc[DatabaseDef] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. 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]
    Definition Classes
    DatabaseDef
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. 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
    DatabaseDefDatabaseDef → Closeable → AutoCloseable
  12. def createDatabaseActionContext[T](_useSameThread: Boolean): Context

    Create the default DatabaseActionContext for this backend.

    Create the default DatabaseActionContext for this backend.

    Attributes
    protected[this]
    Definition Classes
    DatabaseDefDatabaseDef
  13. 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]
    Definition Classes
    DatabaseDef
  14. 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
    DatabaseDefDatabaseDef
  15. 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]
    Definition Classes
    DatabaseDefDatabaseDef
  16. val dbs: Vector[backend.DatabaseComponent.DatabaseDef]

  17. def ensuring(cond: (DatabaseDef) ⇒ Boolean, msg: ⇒ Any): DatabaseDef

    Implicit information
    This member is added by an implicit conversion from DatabaseDef to Ensuring[DatabaseDef] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: (DatabaseDef) ⇒ Boolean): DatabaseDef

    Implicit information
    This member is added by an implicit conversion from DatabaseDef to Ensuring[DatabaseDef] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: Boolean, msg: ⇒ Any): DatabaseDef

    Implicit information
    This member is added by an implicit conversion from DatabaseDef to Ensuring[DatabaseDef] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: Boolean): DatabaseDef

    Implicit information
    This member is added by an implicit conversion from DatabaseDef to Ensuring[DatabaseDef] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  23. val executionContext: ExecutionContext

  24. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from DatabaseDef to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  26. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  27. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. def logAction(a: DBIOAction[_, NoStream, Nothing], ctx: Context): Unit

    Attributes
    protected[this]
    Definition Classes
    DatabaseDef
  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. final def releaseSession(ctx: Context, discardErrors: Boolean): 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.

    discardErrors

    If set to true, swallow all non-fatal errors that arise while closing the Session.

    Attributes
    protected[this]
    Definition Classes
    DatabaseDef
  34. final def run[R](a: DBIOAction[R, NoStream, Nothing]): Future[R]

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

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

    Definition Classes
    DatabaseDef
  35. 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]
    Definition Classes
    DatabaseDef
  36. def runSynchronousDatabaseAction[R](a: SynchronousDatabaseAction[R, NoStream, This, _], ctx: Context, highPrio: Boolean): Future[R]

    Run a SynchronousDatabaseAction on this database.

    Run a SynchronousDatabaseAction on this database.

    Attributes
    protected[this]
    Definition Classes
    DatabaseDef
  37. def scheduleSynchronousStreaming(a: SynchronousDatabaseAction[_, _ <: NoStream, This, _ <: Effect], ctx: StreamingContext, highPrio: 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[slick.backend.DatabaseComponent]
    Definition Classes
    DatabaseDef
  38. 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.

    Definition Classes
    DatabaseDefDatabaseDef
  39. 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).

    Definition Classes
    DatabaseDef
  40. def streamSynchronousDatabaseAction(a: SynchronousDatabaseAction[_, _ <: NoStream, This, _ <: Effect], ctx: StreamingContext, highPrio: Boolean): Future[Null]

    Stream a SynchronousDatabaseAction on this database.

    Stream a SynchronousDatabaseAction on this database.

    Attributes
    protected[this]
    Definition Classes
    DatabaseDef
  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  42. val synchronousExecutionContext: ExecutionContext

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

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

    Attributes
    protected[this]
    Definition Classes
    DatabaseDefDatabaseDef
  43. def toString(): String

    Definition Classes
    AnyRef → Any
  44. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. def [B](y: B): (DatabaseDef, B)

    Implicit information
    This member is added by an implicit conversion from DatabaseDef to ArrowAssoc[DatabaseDef] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from DatabaseDef to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (databaseDef: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from DatabaseDef to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (databaseDef: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def withDynSession[T](f: ⇒ T): T

    Run the supplied thunk with a new session and automatically close the session at the end.

    Run the supplied thunk with a new session and automatically close the session at the end. The session is stored in a dynamic (inheritable thread-local) variable which can be accessed with the implicit function in Database.dynamicSession.

    Definition Classes
    DatabaseDef
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0) Use the new Action-based API instead

  2. def withDynTransaction[T](f: ⇒ T): T

    Run the supplied thunk with a new session in a transaction and automatically close the session at the end.

    Run the supplied thunk with a new session in a transaction and automatically close the session at the end. The session is stored in a dynamic (inheritable thread-local) variable which can be accessed with the implicit function in Database.dynamicSession.

    Definition Classes
    DatabaseDef
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0) Use the new Action-based API instead

  3. def withSession[T](f: (Session) ⇒ T): T

    Run the supplied function with a new session and automatically close the session at the end.

    Run the supplied function with a new session and automatically close the session at the end. Exceptions thrown while closing the session are propagated, but only if the code block using the session terminated normally. Otherwise the first exception wins.

    Definition Classes
    DatabaseDef
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0) Use the new Action-based API instead

  4. def withTransaction[T](f: (Session) ⇒ T): T

    Run the supplied function with a new session in a transaction and automatically close the session at the end.

    Run the supplied function with a new session in a transaction and automatically close the session at the end.

    Definition Classes
    DatabaseDef
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0) Use the new Action-based API instead

  5. def x: DatabaseDef

    Implicit information
    This member is added by an implicit conversion from DatabaseDef to ArrowAssoc[DatabaseDef] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (databaseDef: ArrowAssoc[DatabaseDef]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  6. def x: DatabaseDef

    Implicit information
    This member is added by an implicit conversion from DatabaseDef to Ensuring[DatabaseDef] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (databaseDef: Ensuring[DatabaseDef]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from DistributedBackend.DatabaseDef

Inherited from Closeable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from DatabaseDef to StringAdd

Inherited by implicit conversion any2stringfmt from DatabaseDef to StringFormat

Inherited by implicit conversion any2ArrowAssoc from DatabaseDef to ArrowAssoc[DatabaseDef]

Inherited by implicit conversion any2Ensuring from DatabaseDef to Ensuring[DatabaseDef]

Ungrouped