beam-migrate-0.2.0.0: SQL DDL support and migrations support library for Beam

Safe HaskellNone
LanguageHaskell2010

Database.Beam.Migrate.Checks

Contents

Description

Defines common DatabasePredicates that are shared among backends

Synopsis

Table checks

data TableExistsPredicate Source #

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

Constructors

TableExistsPredicate Text

Table name

Instances

Eq TableExistsPredicate Source # 
Ord TableExistsPredicate Source # 
Show TableExistsPredicate Source # 
Generic TableExistsPredicate Source # 
Hashable TableExistsPredicate Source # 
DatabasePredicate TableExistsPredicate Source # 
type Rep TableExistsPredicate Source # 
type Rep TableExistsPredicate = D1 * (MetaData "TableExistsPredicate" "Database.Beam.Migrate.Checks" "beam-migrate-0.2.0.0-luEQn16wb5J06t50caeQc" False) (C1 * (MetaCons "TableExistsPredicate" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)))

data TableHasColumn syntax 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.

Constructors

TableHasColumn :: Typeable (Sql92ColumnSchemaColumnTypeSyntax syntax) => {..} -> TableHasColumn syntax 

Fields

data TableColumnHasConstraint syntax Source #

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

Instances

Eq (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax) => Eq (TableColumnHasConstraint syntax) Source # 
Generic (TableColumnHasConstraint syntax) Source # 

Associated Types

type Rep (TableColumnHasConstraint syntax) :: * -> * #

Hashable (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax) => Hashable (TableColumnHasConstraint syntax) Source # 
(Typeable * syntax, Sql92SerializableConstraintDefinitionSyntax (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax), Hashable (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax), Sql92DisplaySyntax (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax), Eq (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax)) => DatabasePredicate (TableColumnHasConstraint syntax) Source # 
type Rep (TableColumnHasConstraint syntax) Source # 
type Rep (TableColumnHasConstraint syntax) = D1 * (MetaData "TableColumnHasConstraint" "Database.Beam.Migrate.Checks" "beam-migrate-0.2.0.0-luEQn16wb5J06t50caeQc" False) (C1 * (MetaCons "TableColumnHasConstraint" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "hasConstraint_table") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)) ((:*:) * (S1 * (MetaSel (Just Symbol "hasConstraint_column") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "hasConstraint_defn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax))))))

data TableHasPrimaryKey Source #

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

Constructors

TableHasPrimaryKey 

Fields

Instances

Eq TableHasPrimaryKey Source # 
Show TableHasPrimaryKey Source # 
Generic TableHasPrimaryKey Source # 
Hashable TableHasPrimaryKey Source # 
DatabasePredicate TableHasPrimaryKey Source # 
type Rep TableHasPrimaryKey Source # 
type Rep TableHasPrimaryKey = D1 * (MetaData "TableHasPrimaryKey" "Database.Beam.Migrate.Checks" "beam-migrate-0.2.0.0-luEQn16wb5J06t50caeQc" False) (C1 * (MetaCons "TableHasPrimaryKey" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "hasPrimaryKey_table") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "hasPrimaryKey_cols") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Text]))))

Deserialization