beam-migrate-0.3.2.1: 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 # 
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

Associated Types

type Rep TableExistsPredicate :: * -> * #

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.3.2.1-5uUjtiBqfLqFuBaaiGZEEb" False) (C1 (MetaCons "TableExistsPredicate" PrefixI False) (S1 (MetaSel (Nothing :: Maybe 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 # 
Instance details

Defined in Database.Beam.Migrate.Checks

Generic (TableColumnHasConstraint syntax) Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

Associated Types

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

Hashable (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax) => Hashable (TableColumnHasConstraint syntax) Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

(Typeable syntax, Sql92SerializableConstraintDefinitionSyntax (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax), Hashable (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax), Sql92DisplaySyntax (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax), Eq (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax)) => DatabasePredicate (TableColumnHasConstraint syntax) Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep (TableColumnHasConstraint syntax) Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep (TableColumnHasConstraint syntax) = D1 (MetaData "TableColumnHasConstraint" "Database.Beam.Migrate.Checks" "beam-migrate-0.3.2.1-5uUjtiBqfLqFuBaaiGZEEb" False) (C1 (MetaCons "TableColumnHasConstraint" PrefixI True) (S1 (MetaSel (Just "hasConstraint_table") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text) :*: (S1 (MetaSel (Just "hasConstraint_column") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text) :*: S1 (MetaSel (Just "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 # 
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

Associated Types

type Rep TableHasPrimaryKey :: * -> * #

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.3.2.1-5uUjtiBqfLqFuBaaiGZEEb" False) (C1 (MetaCons "TableHasPrimaryKey" PrefixI True) (S1 (MetaSel (Just "hasPrimaryKey_table") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text) :*: S1 (MetaSel (Just "hasPrimaryKey_cols") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Text])))

Deserialization