SchemaUtils

org.apache.pekko.persistence.jdbc.testkit.javadsl.SchemaUtils
object SchemaUtils

Attributes

Source
SchemaUtils.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

@ApiMayChange
def applyScript(script: String, actorSystem: ClassicActorSystemProvider): CompletionStage[Done]

This method can be used to load alternative DDL scripts.

This method can be used to load alternative DDL scripts.

This utility method is intended to be used for testing only. For production, it's recommended to run any DDL statements before the system is started.

It will use the database settings found under jdbc-journal, or pekko-persistence-jdbc.shared-databases if configured so. See https://pekko.apache.org/docs/pekko-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details.

Value parameters

script

the DDL script. The passed script can contain more then one SQL statements separated by a ; (semi-colon).

Attributes

Source
SchemaUtils.scala
@ApiMayChange
def applyScript(script: String, separator: String, configKey: String, actorSystem: ClassicActorSystemProvider): CompletionStage[Done]

This method can be used to load alternative DDL scripts.

This method can be used to load alternative DDL scripts.

This utility method is intended to be used for testing only. For production, it's recommended to run any DDL statements before the system is started.

It will use the database settings found under configKey, or pekko-persistence-jdbc.shared-databases if configured so. See https://pekko.apache.org/docs/pekko-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details.

Value parameters

configKey

the database configuration key to use. Can be jdbc-journal or jdbc-snapshot-store.

script

the DDL script. The passed script can contain more then one SQL statements.

separator

used to separate the different DDL statements.

Attributes

Source
SchemaUtils.scala
@ApiMayChange
def createIfNotExists(actorSystem: ClassicActorSystemProvider): CompletionStage[Done]

Creates the schema for both the journal and the snapshot table using the default schema definition.

Creates the schema for both the journal and the snapshot table using the default schema definition.

For information about the different schemas and supported databases consult https://pekko.apache.org/docs/pekko-persistence-jdbc/current/index.html#database-schema

This utility method is intended to be used for testing only. For production, it's recommended to create run DDL statements before the system is started.

This method will automatically detects the configured database using the settings from jdbc-journal config. If configured with use-shared-db, it will use the pekko-persistence-jdbc.shared-databases definition instead. See https://pekko.apache.org/docs/pekko-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details.

Attributes

Source
SchemaUtils.scala
@ApiMayChange
def createIfNotExists(configKey: String, actorSystem: ClassicActorSystemProvider): CompletionStage[Done]

Creates the schema for both the journal and the snapshot table using the default schema definition.

Creates the schema for both the journal and the snapshot table using the default schema definition.

For information about the different schemas and supported databases consult https://pekko.apache.org/docs/pekko-persistence-jdbc/current/index.html#database-schema

This utility method is intended to be used for testing only. For production, it's recommended to create run DDL statements before the system is started.

This method will automatically detects the configured database using the settings from configKey config. If configured with use-shared-db, it will use the pekko-persistence-jdbc.shared-databases definition instead. See https://pekko.apache.org/docs/pekko-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details.

Value parameters

configKey

the database journal configuration key to use.

Attributes

Source
SchemaUtils.scala
@ApiMayChange
def dropIfExists(actorSystem: ClassicActorSystemProvider): CompletionStage[Done]

Drops the schema for both the journal and the snapshot table using the default schema definition.

Drops the schema for both the journal and the snapshot table using the default schema definition.

For information about the different schemas and supported databases consult https://pekko.apache.org/docs/pekko-persistence-jdbc/current/index.html#database-schema

This utility method is intended to be used for testing only. For production, it's recommended to run any DDL statements before the system is started.

This method will automatically detects the configured database using the settings from jdbc-journal config. If configured with use-shared-db, it will use the pekko-persistence-jdbc.shared-databases definition instead. See https://pekko.apache.org/docs/pekko-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details.

Attributes

Source
SchemaUtils.scala
@ApiMayChange
def dropIfExists(configKey: String, actorSystem: ClassicActorSystemProvider): CompletionStage[Done]

Drops the schema for both the journal and the snapshot table using the default schema definition.

Drops the schema for both the journal and the snapshot table using the default schema definition.

For information about the different schemas and supported databases consult https://pekko.apache.org/docs/pekko-persistence-jdbc/current/index.html#database-schema

This utility method is intended to be used for testing only. For production, it's recommended to run any DDL statements before the system is started.

This method will automatically detects the configured database using the settings from configKey config. If configured with use-shared-db, it will use the pekko-persistence-jdbc.shared-databases definition instead. See https://pekko.apache.org/docs/pekko-persistence-jdbc/current/index.html#sharing-the-database-connection-pool-between-the-journals for details.

Value parameters

configKey

the database journal configuration key to use.

Attributes

Source
SchemaUtils.scala