dbmigrations-2.1.0: An implementation of relational database "migrations"
Safe HaskellNone
LanguageHaskell2010

Database.Schema.Migrations.Test.BackendTest

Description

A test that is not executed as part of this package's test suite but rather acts as a conformance test suit for database specific backend implementations. All backend specific executable packages are expected to have a test suite that runs this test.

Synopsis

Documentation

class BackendConnection c where Source #

A typeclass for database connections that needs to implemented for each specific database type to use this test.

Methods

supportsTransactionalDDL :: c -> Bool Source #

Whether this backend supports transactional DDL; if it doesn't, we'll skip any tests that rely on that behavior.

commit :: c -> IO () Source #

Commits the current transaction.

withTransaction :: c -> (c -> IO a) -> IO a Source #

Executes an IO action inside a transaction.

getTables :: c -> IO [ByteString] Source #

Retrieves a list of all tables in the current database/scheme.

catchAll :: c -> IO a -> IO a -> IO a Source #

makeBackend :: c -> Backend Source #

Returns a backend instance.

tests :: BackendConnection bc => bc -> IO () Source #