HeapDatabaseDef

slick.memory.HeapBackend.HeapDatabaseDef
class HeapDatabaseDef(val synchronousExecutionContext: ExecutionContext) extends BasicDatabaseDef

Attributes

Source:
HeapBackend.scala
Graph
Supertypes
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

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.

Attributes

Source:
HeapBackend.scala

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

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

Attributes

Source:
HeapBackend.scala
def createTable(name: String, columns: IndexedSeq[Column], indexes: IndexedSeq[Index], constraints: IndexedSeq[Constraint]): HeapTable

Attributes

Source:
HeapBackend.scala
def createTableIfNotExists(name: String, columns: IndexedSeq[Column], indexes: IndexedSeq[Index], constraints: IndexedSeq[Constraint]): HeapTable

Attributes

Source:
HeapBackend.scala
def dropTable(name: String): Unit

Attributes

Source:
HeapBackend.scala
def dropTableIfExists(name: String): Unit

Attributes

Source:
HeapBackend.scala
def getTable(name: String): HeapTable

Attributes

Source:
HeapBackend.scala
def getTables: IndexedSeq[HeapTable]

Attributes

Source:
HeapBackend.scala
override def shutdown: Future[Unit]

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.

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.

Attributes

Definition Classes
Source:
HeapBackend.scala
def truncateTable(name: String): Unit

Attributes

Source:
HeapBackend.scala

Inherited methods

protected def prioritizedRunnable(priority: => Priority, run: SetConnectionReleased => Unit): PrioritizedRunnable

Attributes

Inherited from:
BasicDatabaseDef
Source:
BasicBackend.scala
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.

Attributes

Inherited from:
BasicDatabaseDef
Source:
BasicBackend.scala
protected[BasicBackend] 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

Inherited from:
BasicDatabaseDef
Source:
BasicBackend.scala
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. This method is only supported for streaming actions.

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

Attributes

Inherited from:
BasicDatabaseDef
Source:
BasicBackend.scala