Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines common DatabasePredicate
s that are shared among backends
- data TableExistsPredicate = TableExistsPredicate Text
- data TableHasColumn syntax where
- TableHasColumn :: Typeable (Sql92ColumnSchemaColumnTypeSyntax syntax) => {..} -> TableHasColumn syntax
- data TableColumnHasConstraint syntax = TableColumnHasConstraint {}
- data TableHasPrimaryKey = TableHasPrimaryKey {}
- beamCheckDeserializers :: forall cmd. (IsSql92DdlCommandSyntax cmd, Sql92SerializableDataTypeSyntax (Sql92DdlCommandDataTypeSyntax cmd), Sql92SerializableConstraintDefinitionSyntax (Sql92DdlCommandConstraintDefinitionSyntax cmd)) => BeamDeserializers cmd
Table checks
data TableExistsPredicate Source #
Asserts that a table with the given name exists in a database
TableExistsPredicate Text | Table name |
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
.
TableHasColumn :: Typeable (Sql92ColumnSchemaColumnTypeSyntax syntax) => {..} -> TableHasColumn syntax | |
|
Eq (Sql92ColumnSchemaColumnTypeSyntax syntax) => Eq (TableHasColumn syntax) Source # | |
Hashable (Sql92ColumnSchemaColumnTypeSyntax syntax) => Hashable (TableHasColumn syntax) Source # | |
(Typeable * syntax, Sql92SerializableDataTypeSyntax (Sql92ColumnSchemaColumnTypeSyntax syntax), Hashable (Sql92ColumnSchemaColumnTypeSyntax syntax), Sql92DisplaySyntax (Sql92ColumnSchemaColumnTypeSyntax syntax), Eq (Sql92ColumnSchemaColumnTypeSyntax syntax)) => DatabasePredicate (TableHasColumn syntax) Source # | |
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
TableColumnHasConstraint | |
|
Eq (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax) => Eq (TableColumnHasConstraint syntax) Source # | |
Generic (TableColumnHasConstraint syntax) Source # | |
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 # | |
data TableHasPrimaryKey Source #
Asserts that the given table has a primary key made of the given columns. The order of the columns is significant.
TableHasPrimaryKey | |
|
Deserialization
beamCheckDeserializers :: forall cmd. (IsSql92DdlCommandSyntax cmd, Sql92SerializableDataTypeSyntax (Sql92DdlCommandDataTypeSyntax cmd), Sql92SerializableConstraintDefinitionSyntax (Sql92DdlCommandConstraintDefinitionSyntax cmd)) => BeamDeserializers cmd Source #
BeamDeserializers
for all the predicates defined in this module