← Back to Kairo Docs|API Reference (Dokka)

PostgresExtension

class PostgresExtension : PostgresExtensionAware, BeforeAllCallback, BeforeEachCallback, AfterEachCallback

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
open var ExtensionContext.database: Database?
Link copied to clipboard
open var ExtensionContext.databaseName: String?
Link copied to clipboard
open val ExtensionContext.postgres: PostgreSQLContainer?

Functions

Link copied to clipboard
open override fun afterEach(context: ExtensionContext)

Drops the database for the current test (if it exists).

Link copied to clipboard
open override fun beforeAll(context: ExtensionContext)

Idempotently starts a Postgres Docker container.

Link copied to clipboard
open override fun beforeEach(context: ExtensionContext)

Creates a database for the current test.

Link copied to clipboard
open fun <T> PostgreSQLContainer.connection(block: (connection: Connection) -> T): T