beam-migrate-0.5.1.2: SQL DDL support and migrations support library for Beam
Safe Haskell None
Language Haskell2010

Database.Beam.Migrate.Checks

Description

Defines common DatabasePredicate s that are shared among backends

Synopsis

Table checks

data TableExistsPredicate Source #

Asserts that a table with the given name exists in a database

Instances

Instances details
Eq TableExistsPredicate Source #
Instance details

Defined in Database.Beam.Migrate.Checks

Ord TableExistsPredicate Source #
Instance details

Defined in Database.Beam.Migrate.Checks

Show TableExistsPredicate Source #
Instance details

Defined in Database.Beam.Migrate.Checks

Generic TableExistsPredicate Source #
Instance details

Defined in Database.Beam.Migrate.Checks

Hashable TableExistsPredicate Source #
Instance details

Defined in Database.Beam.Migrate.Checks

DatabasePredicate TableExistsPredicate Source #
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep TableExistsPredicate Source #
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep TableExistsPredicate = D1 (' MetaData "TableExistsPredicate" "Database.Beam.Migrate.Checks" "beam-migrate-0.5.1.2-5J0i6YZEVbedBErF518Oy" ' False ) ( C1 (' MetaCons "TableExistsPredicate" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 QualifiedName )))

class HasDataTypeCreatedCheck dataType where Source #

A class that can check whether a particular data type is present in a set of preconditions.

Methods

dataTypeHasBeenCreated :: dataType -> ( forall preCondition. Typeable preCondition => [preCondition]) -> Bool Source #

Instances

Instances details
HasDataTypeCreatedCheck HsDataType Source #
Instance details

Defined in Database.Beam.Haskell.Syntax

Methods

dataTypeHasBeenCreated :: HsDataType -> ( forall preCondition. Typeable preCondition => [preCondition]) -> Bool Source #

data TableHasColumn be where Source #

Asserts that the table specified has a column with the given data type. The type paramater syntax should be an instance of IsSql92ColumnSchemaSyntax .

data TableColumnHasConstraint be Source #

Asserts that a particular column of a table has a given constraint. The syntax type parameter should be an instance of IsSql92ColumnSchemaSyntax

Instances

Instances details
Eq ( BeamSqlBackendColumnConstraintDefinitionSyntax be) => Eq ( TableColumnHasConstraint be) Source #
Instance details

Defined in Database.Beam.Migrate.Checks

Generic ( TableColumnHasConstraint be) Source #
Instance details

Defined in Database.Beam.Migrate.Checks

Hashable ( BeamSqlBackendColumnConstraintDefinitionSyntax be) => Hashable ( TableColumnHasConstraint be) Source #
Instance details

Defined in Database.Beam.Migrate.Checks

( Typeable be, BeamMigrateOnlySqlBackend be, Hashable ( BeamSqlBackendColumnConstraintDefinitionSyntax be)) => DatabasePredicate ( TableColumnHasConstraint be) Source #
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep ( TableColumnHasConstraint be) Source #
Instance details

Defined in Database.Beam.Migrate.Checks

data TableHasPrimaryKey Source #

Asserts that the given table has a primary key made of the given columns. The order of the columns is significant.

Instances

Instances details
Eq TableHasPrimaryKey Source #
Instance details

Defined in Database.Beam.Migrate.Checks

Show TableHasPrimaryKey Source #
Instance details

Defined in Database.Beam.Migrate.Checks

Generic TableHasPrimaryKey Source #
Instance details

Defined in Database.Beam.Migrate.Checks

Hashable TableHasPrimaryKey Source #
Instance details

Defined in Database.Beam.Migrate.Checks

DatabasePredicate TableHasPrimaryKey Source #
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep TableHasPrimaryKey Source #
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep TableHasPrimaryKey = D1 (' MetaData "TableHasPrimaryKey" "Database.Beam.Migrate.Checks" "beam-migrate-0.5.1.2-5J0i6YZEVbedBErF518Oy" ' False ) ( C1 (' MetaCons "TableHasPrimaryKey" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "hasPrimaryKey_table") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 QualifiedName ) :*: S1 (' MetaSel (' Just "hasPrimaryKey_cols") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Text ])))

Deserialization