Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Finally-tagless encoding of SQL92 DDL commands.
If you're writing a beam backend driver and you want to support migrations,
making an instance of your command syntax for IsSql92DdlCommandSyntax
and
making it satisfy Sql92SaneDdlCommandSyntax
.
Synopsis
- type Sql92SaneDdlCommandSyntax cmd = (Sql92SaneDdlCommandSyntaxMigrateOnly cmd, Sql92ExpressionCastTargetSyntax (Sql92ExpressionSyntax cmd) ~ Sql92DdlCommandDataTypeSyntax cmd, Sql92ColumnSchemaExpressionSyntax (Sql92DdlCommandColumnSchemaSyntax cmd) ~ Sql92ExpressionSyntax cmd)
- type Sql92SaneDdlCommandSyntaxMigrateOnly cmd = (IsSql92DdlCommandSyntax cmd, Sql92SerializableDataTypeSyntax (Sql92DdlCommandDataTypeSyntax cmd), Sql92SerializableConstraintDefinitionSyntax (Sql92DdlCommandConstraintDefinitionSyntax cmd), Typeable (Sql92DdlCommandColumnSchemaSyntax cmd), Sql92AlterTableColumnSchemaSyntax (Sql92AlterTableAlterTableActionSyntax (Sql92DdlCommandAlterTableSyntax cmd)) ~ Sql92CreateTableColumnSchemaSyntax (Sql92DdlCommandCreateTableSyntax cmd))
- type Sql92DdlCommandDataTypeSyntax syntax = Sql92ColumnSchemaColumnTypeSyntax (Sql92DdlCommandColumnSchemaSyntax syntax)
- type Sql92DdlCommandColumnSchemaSyntax syntax = Sql92CreateTableColumnSchemaSyntax (Sql92DdlCommandCreateTableSyntax syntax)
- type Sql92DdlCommandConstraintDefinitionSyntax syntax = Sql92ColumnSchemaColumnConstraintDefinitionSyntax (Sql92DdlCommandColumnSchemaSyntax syntax)
- type Sql92DdlColumnSchemaConstraintSyntax syntax = Sql92ColumnConstraintDefinitionConstraintSyntax (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax)
- type Sql92DdlCommandColumnConstraintSyntax syntax = Sql92DdlColumnSchemaConstraintSyntax (Sql92DdlCommandColumnSchemaSyntax syntax)
- type Sql92DdlCommandMatchTypeSyntax syntax = Sql92ColumnConstraintMatchTypeSyntax (Sql92DdlCommandColumnConstraintSyntax syntax)
- type Sql92DdlCommandReferentialActionSyntax syntax = Sql92ColumnConstraintReferentialActionSyntax (Sql92DdlCommandColumnConstraintSyntax syntax)
- type Sql92DdlCommandConstraintAttributesSyntax syntax = Sql92ColumnConstraintDefinitionAttributesSyntax (Sql92DdlCommandConstraintDefinitionSyntax syntax)
- type Sql92DdlCommandAlterTableActionSyntax syntax = Sql92AlterTableAlterTableActionSyntax (Sql92DdlCommandAlterTableSyntax syntax)
- class (IsSql92CreateTableSyntax (Sql92DdlCommandCreateTableSyntax syntax), IsSql92DropTableSyntax (Sql92DdlCommandDropTableSyntax syntax), IsSql92AlterTableSyntax (Sql92DdlCommandAlterTableSyntax syntax)) => IsSql92DdlCommandSyntax syntax where
- type Sql92DdlCommandCreateTableSyntax syntax :: *
- type Sql92DdlCommandAlterTableSyntax syntax :: *
- type Sql92DdlCommandDropTableSyntax syntax :: *
- createTableCmd :: Sql92DdlCommandCreateTableSyntax syntax -> syntax
- dropTableCmd :: Sql92DdlCommandDropTableSyntax syntax -> syntax
- alterTableCmd :: Sql92DdlCommandAlterTableSyntax syntax -> syntax
- class (IsSql92TableConstraintSyntax (Sql92CreateTableTableConstraintSyntax syntax), IsSql92ColumnSchemaSyntax (Sql92CreateTableColumnSchemaSyntax syntax), IsSql92TableNameSyntax (Sql92CreateTableTableNameSyntax syntax)) => IsSql92CreateTableSyntax syntax where
- type Sql92CreateTableTableNameSyntax syntax :: *
- type Sql92CreateTableColumnSchemaSyntax syntax :: *
- type Sql92CreateTableTableConstraintSyntax syntax :: *
- type Sql92CreateTableOptionsSyntax syntax :: *
- createTableSyntax :: Maybe (Sql92CreateTableOptionsSyntax syntax) -> Sql92CreateTableTableNameSyntax syntax -> [(Text, Sql92CreateTableColumnSchemaSyntax syntax)] -> [Sql92CreateTableTableConstraintSyntax syntax] -> syntax
- class IsSql92TableNameSyntax (Sql92DropTableTableNameSyntax syntax) => IsSql92DropTableSyntax syntax where
- type Sql92DropTableTableNameSyntax syntax :: *
- dropTableSyntax :: Sql92DropTableTableNameSyntax syntax -> syntax
- class (IsSql92TableNameSyntax (Sql92AlterTableTableNameSyntax syntax), IsSql92AlterTableActionSyntax (Sql92AlterTableAlterTableActionSyntax syntax)) => IsSql92AlterTableSyntax syntax where
- type Sql92AlterTableTableNameSyntax syntax :: *
- type Sql92AlterTableAlterTableActionSyntax syntax :: *
- alterTableSyntax :: Sql92AlterTableTableNameSyntax syntax -> Sql92AlterTableAlterTableActionSyntax syntax -> syntax
- class (IsSql92ColumnSchemaSyntax (Sql92AlterTableColumnSchemaSyntax syntax), IsSql92AlterColumnActionSyntax (Sql92AlterTableAlterColumnActionSyntax syntax)) => IsSql92AlterTableActionSyntax syntax where
- type Sql92AlterTableAlterColumnActionSyntax syntax :: *
- type Sql92AlterTableColumnSchemaSyntax syntax :: *
- alterColumnSyntax :: Text -> Sql92AlterTableAlterColumnActionSyntax syntax -> syntax
- addColumnSyntax :: Text -> Sql92AlterTableColumnSchemaSyntax syntax -> syntax
- dropColumnSyntax :: Text -> syntax
- renameTableToSyntax :: Text -> syntax
- renameColumnToSyntax :: Text -> Text -> syntax
- class IsSql92AlterColumnActionSyntax syntax where
- setNotNullSyntax, setNullSyntax :: syntax
- class (IsSql92ColumnConstraintDefinitionSyntax (Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema), IsSql92DataTypeSyntax (Sql92ColumnSchemaColumnTypeSyntax columnSchema), Typeable (Sql92ColumnSchemaColumnTypeSyntax columnSchema), Sql92DisplaySyntax (Sql92ColumnSchemaColumnTypeSyntax columnSchema), Hashable (Sql92ColumnSchemaColumnTypeSyntax columnSchema), Eq (Sql92ColumnSchemaColumnTypeSyntax columnSchema), Sql92DisplaySyntax (Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema), Eq (Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema), Hashable (Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema), IsSql92ExpressionSyntax (Sql92ColumnSchemaExpressionSyntax columnSchema), Typeable columnSchema, Sql92DisplaySyntax columnSchema, Eq columnSchema, Hashable columnSchema) => IsSql92ColumnSchemaSyntax columnSchema where
- type Sql92ColumnSchemaColumnTypeSyntax columnSchema :: *
- type Sql92ColumnSchemaExpressionSyntax columnSchema :: *
- type Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema :: *
- columnSchemaSyntax :: Sql92ColumnSchemaColumnTypeSyntax columnSchema -> Maybe (Sql92ColumnSchemaExpressionSyntax columnSchema) -> [Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema] -> Maybe Text -> columnSchema
- class Typeable constraint => IsSql92TableConstraintSyntax constraint where
- primaryKeyConstraintSyntax :: [Text] -> constraint
- class Typeable match => IsSql92MatchTypeSyntax match where
- fullMatchSyntax :: match
- partialMatchSyntax :: match
- class Typeable refAction => IsSql92ReferentialActionSyntax refAction where
- referentialActionCascadeSyntax :: refAction
- referentialActionSetNullSyntax :: refAction
- referentialActionSetDefaultSyntax :: refAction
- referentialActionNoActionSyntax :: refAction
- class (IsSql92ColumnConstraintSyntax (Sql92ColumnConstraintDefinitionConstraintSyntax constraint), IsSql92ConstraintAttributesSyntax (Sql92ColumnConstraintDefinitionAttributesSyntax constraint), Typeable constraint) => IsSql92ColumnConstraintDefinitionSyntax constraint where
- type Sql92ColumnConstraintDefinitionConstraintSyntax constraint :: *
- type Sql92ColumnConstraintDefinitionAttributesSyntax constraint :: *
- constraintDefinitionSyntax :: Maybe Text -> Sql92ColumnConstraintDefinitionConstraintSyntax constraint -> Maybe (Sql92ColumnConstraintDefinitionAttributesSyntax constraint) -> constraint
- class (Semigroup attrs, Monoid attrs, Typeable attrs) => IsSql92ConstraintAttributesSyntax attrs where
- initiallyDeferredAttributeSyntax :: attrs
- initiallyImmediateAttributeSyntax :: attrs
- notDeferrableAttributeSyntax :: attrs
- deferrableAttributeSyntax :: attrs
- class (IsSql92MatchTypeSyntax (Sql92ColumnConstraintMatchTypeSyntax constraint), IsSql92ReferentialActionSyntax (Sql92ColumnConstraintReferentialActionSyntax constraint), Typeable (Sql92ColumnConstraintExpressionSyntax constraint), Typeable constraint) => IsSql92ColumnConstraintSyntax constraint where
- type Sql92ColumnConstraintMatchTypeSyntax constraint :: *
- type Sql92ColumnConstraintReferentialActionSyntax constraint :: *
- type Sql92ColumnConstraintExpressionSyntax constraint :: *
- notNullConstraintSyntax :: constraint
- uniqueColumnConstraintSyntax :: constraint
- primaryKeyColumnConstraintSyntax :: constraint
- checkColumnConstraintSyntax :: Sql92ColumnConstraintExpressionSyntax constraint -> constraint
- referencesConstraintSyntax :: Text -> [Text] -> Maybe (Sql92ColumnConstraintMatchTypeSyntax constraint) -> Maybe (Sql92ColumnConstraintReferentialActionSyntax constraint) -> Maybe (Sql92ColumnConstraintReferentialActionSyntax constraint) -> constraint
- class Sql92SerializableDataTypeSyntax dataType where
- serializeDataType :: dataType -> Value
- class Sql92SerializableConstraintDefinitionSyntax constraint where
- serializeConstraint :: constraint -> Value
Convenience type synonyms
type Sql92SaneDdlCommandSyntax cmd = (Sql92SaneDdlCommandSyntaxMigrateOnly cmd, Sql92ExpressionCastTargetSyntax (Sql92ExpressionSyntax cmd) ~ Sql92DdlCommandDataTypeSyntax cmd, Sql92ColumnSchemaExpressionSyntax (Sql92DdlCommandColumnSchemaSyntax cmd) ~ Sql92ExpressionSyntax cmd) Source #
Syntax equalities that any reasonable DDL syntax would follow, including equalities between beam-migrate and beam-core types.
type Sql92SaneDdlCommandSyntaxMigrateOnly cmd = (IsSql92DdlCommandSyntax cmd, Sql92SerializableDataTypeSyntax (Sql92DdlCommandDataTypeSyntax cmd), Sql92SerializableConstraintDefinitionSyntax (Sql92DdlCommandConstraintDefinitionSyntax cmd), Typeable (Sql92DdlCommandColumnSchemaSyntax cmd), Sql92AlterTableColumnSchemaSyntax (Sql92AlterTableAlterTableActionSyntax (Sql92DdlCommandAlterTableSyntax cmd)) ~ Sql92CreateTableColumnSchemaSyntax (Sql92DdlCommandCreateTableSyntax cmd)) Source #
Syntax equalities for any reasonable DDL syntax, only including types defined here.
type Sql92DdlCommandDataTypeSyntax syntax = Sql92ColumnSchemaColumnTypeSyntax (Sql92DdlCommandColumnSchemaSyntax syntax) Source #
type Sql92DdlCommandColumnSchemaSyntax syntax = Sql92CreateTableColumnSchemaSyntax (Sql92DdlCommandCreateTableSyntax syntax) Source #
type Sql92DdlCommandConstraintDefinitionSyntax syntax = Sql92ColumnSchemaColumnConstraintDefinitionSyntax (Sql92DdlCommandColumnSchemaSyntax syntax) Source #
type Sql92DdlColumnSchemaConstraintSyntax syntax = Sql92ColumnConstraintDefinitionConstraintSyntax (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax) Source #
type Sql92DdlCommandColumnConstraintSyntax syntax = Sql92DdlColumnSchemaConstraintSyntax (Sql92DdlCommandColumnSchemaSyntax syntax) Source #
type Sql92DdlCommandMatchTypeSyntax syntax = Sql92ColumnConstraintMatchTypeSyntax (Sql92DdlCommandColumnConstraintSyntax syntax) Source #
type Sql92DdlCommandReferentialActionSyntax syntax = Sql92ColumnConstraintReferentialActionSyntax (Sql92DdlCommandColumnConstraintSyntax syntax) Source #
type Sql92DdlCommandConstraintAttributesSyntax syntax = Sql92ColumnConstraintDefinitionAttributesSyntax (Sql92DdlCommandConstraintDefinitionSyntax syntax) Source #
type Sql92DdlCommandAlterTableActionSyntax syntax = Sql92AlterTableAlterTableActionSyntax (Sql92DdlCommandAlterTableSyntax syntax) Source #
class (IsSql92CreateTableSyntax (Sql92DdlCommandCreateTableSyntax syntax), IsSql92DropTableSyntax (Sql92DdlCommandDropTableSyntax syntax), IsSql92AlterTableSyntax (Sql92DdlCommandAlterTableSyntax syntax)) => IsSql92DdlCommandSyntax syntax where Source #
type Sql92DdlCommandCreateTableSyntax syntax :: * Source #
type Sql92DdlCommandAlterTableSyntax syntax :: * Source #
type Sql92DdlCommandDropTableSyntax syntax :: * Source #
createTableCmd :: Sql92DdlCommandCreateTableSyntax syntax -> syntax Source #
dropTableCmd :: Sql92DdlCommandDropTableSyntax syntax -> syntax Source #
alterTableCmd :: Sql92DdlCommandAlterTableSyntax syntax -> syntax Source #
Instances
IsSql92DdlCommandSyntax SqlSyntaxBuilder Source # | |
Defined in Database.Beam.Migrate.SQL.Builder type Sql92DdlCommandCreateTableSyntax SqlSyntaxBuilder Source # type Sql92DdlCommandAlterTableSyntax SqlSyntaxBuilder Source # type Sql92DdlCommandDropTableSyntax SqlSyntaxBuilder Source # createTableCmd :: Sql92DdlCommandCreateTableSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source # dropTableCmd :: Sql92DdlCommandDropTableSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source # alterTableCmd :: Sql92DdlCommandAlterTableSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source # | |
IsSql92DdlCommandSyntax HsAction Source # | |
class (IsSql92TableConstraintSyntax (Sql92CreateTableTableConstraintSyntax syntax), IsSql92ColumnSchemaSyntax (Sql92CreateTableColumnSchemaSyntax syntax), IsSql92TableNameSyntax (Sql92CreateTableTableNameSyntax syntax)) => IsSql92CreateTableSyntax syntax where Source #
type Sql92CreateTableTableNameSyntax syntax :: * Source #
type Sql92CreateTableColumnSchemaSyntax syntax :: * Source #
type Sql92CreateTableTableConstraintSyntax syntax :: * Source #
type Sql92CreateTableOptionsSyntax syntax :: * Source #
createTableSyntax :: Maybe (Sql92CreateTableOptionsSyntax syntax) -> Sql92CreateTableTableNameSyntax syntax -> [(Text, Sql92CreateTableColumnSchemaSyntax syntax)] -> [Sql92CreateTableTableConstraintSyntax syntax] -> syntax Source #
Instances
IsSql92CreateTableSyntax SqlSyntaxBuilder Source # | |
Defined in Database.Beam.Migrate.SQL.Builder type Sql92CreateTableTableNameSyntax SqlSyntaxBuilder Source # type Sql92CreateTableColumnSchemaSyntax SqlSyntaxBuilder Source # type Sql92CreateTableTableConstraintSyntax SqlSyntaxBuilder Source # type Sql92CreateTableOptionsSyntax SqlSyntaxBuilder Source # createTableSyntax :: Maybe (Sql92CreateTableOptionsSyntax SqlSyntaxBuilder) -> Sql92CreateTableTableNameSyntax SqlSyntaxBuilder -> [(Text, Sql92CreateTableColumnSchemaSyntax SqlSyntaxBuilder)] -> [Sql92CreateTableTableConstraintSyntax SqlSyntaxBuilder] -> SqlSyntaxBuilder Source # | |
IsSql92CreateTableSyntax HsAction Source # | |
class IsSql92TableNameSyntax (Sql92DropTableTableNameSyntax syntax) => IsSql92DropTableSyntax syntax where Source #
type Sql92DropTableTableNameSyntax syntax :: * Source #
dropTableSyntax :: Sql92DropTableTableNameSyntax syntax -> syntax Source #
Instances
IsSql92DropTableSyntax SqlSyntaxBuilder Source # | |
Defined in Database.Beam.Migrate.SQL.Builder type Sql92DropTableTableNameSyntax SqlSyntaxBuilder Source # dropTableSyntax :: Sql92DropTableTableNameSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source # | |
IsSql92DropTableSyntax HsAction Source # | |
class (IsSql92TableNameSyntax (Sql92AlterTableTableNameSyntax syntax), IsSql92AlterTableActionSyntax (Sql92AlterTableAlterTableActionSyntax syntax)) => IsSql92AlterTableSyntax syntax where Source #
type Sql92AlterTableTableNameSyntax syntax :: * Source #
type Sql92AlterTableAlterTableActionSyntax syntax :: * Source #
alterTableSyntax :: Sql92AlterTableTableNameSyntax syntax -> Sql92AlterTableAlterTableActionSyntax syntax -> syntax Source #
Instances
IsSql92AlterTableSyntax SqlSyntaxBuilder Source # | |
Defined in Database.Beam.Migrate.SQL.Builder type Sql92AlterTableTableNameSyntax SqlSyntaxBuilder Source # type Sql92AlterTableAlterTableActionSyntax SqlSyntaxBuilder Source # alterTableSyntax :: Sql92AlterTableTableNameSyntax SqlSyntaxBuilder -> Sql92AlterTableAlterTableActionSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source # | |
IsSql92AlterTableSyntax HsAction Source # | |
class (IsSql92ColumnSchemaSyntax (Sql92AlterTableColumnSchemaSyntax syntax), IsSql92AlterColumnActionSyntax (Sql92AlterTableAlterColumnActionSyntax syntax)) => IsSql92AlterTableActionSyntax syntax where Source #
type Sql92AlterTableAlterColumnActionSyntax syntax :: * Source #
type Sql92AlterTableColumnSchemaSyntax syntax :: * Source #
alterColumnSyntax :: Text -> Sql92AlterTableAlterColumnActionSyntax syntax -> syntax Source #
addColumnSyntax :: Text -> Sql92AlterTableColumnSchemaSyntax syntax -> syntax Source #
dropColumnSyntax :: Text -> syntax Source #
renameTableToSyntax :: Text -> syntax Source #
renameColumnToSyntax :: Text -> Text -> syntax Source #
Instances
IsSql92AlterTableActionSyntax SqlSyntaxBuilder Source # | |
Defined in Database.Beam.Migrate.SQL.Builder type Sql92AlterTableAlterColumnActionSyntax SqlSyntaxBuilder Source # type Sql92AlterTableColumnSchemaSyntax SqlSyntaxBuilder Source # alterColumnSyntax :: Text -> Sql92AlterTableAlterColumnActionSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source # addColumnSyntax :: Text -> Sql92AlterTableColumnSchemaSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source # dropColumnSyntax :: Text -> SqlSyntaxBuilder Source # renameTableToSyntax :: Text -> SqlSyntaxBuilder Source # renameColumnToSyntax :: Text -> Text -> SqlSyntaxBuilder Source # | |
IsSql92AlterTableActionSyntax HsNone Source # | |
Defined in Database.Beam.Haskell.Syntax |
class IsSql92AlterColumnActionSyntax syntax where Source #
setNotNullSyntax :: syntax Source #
setNullSyntax :: syntax Source #
Instances
IsSql92AlterColumnActionSyntax SqlSyntaxBuilder Source # | |
Defined in Database.Beam.Migrate.SQL.Builder setNotNullSyntax :: SqlSyntaxBuilder Source # setNullSyntax :: SqlSyntaxBuilder Source # | |
IsSql92AlterColumnActionSyntax HsNone Source # | |
Defined in Database.Beam.Haskell.Syntax |
class (IsSql92ColumnConstraintDefinitionSyntax (Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema), IsSql92DataTypeSyntax (Sql92ColumnSchemaColumnTypeSyntax columnSchema), Typeable (Sql92ColumnSchemaColumnTypeSyntax columnSchema), Sql92DisplaySyntax (Sql92ColumnSchemaColumnTypeSyntax columnSchema), Hashable (Sql92ColumnSchemaColumnTypeSyntax columnSchema), Eq (Sql92ColumnSchemaColumnTypeSyntax columnSchema), Sql92DisplaySyntax (Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema), Eq (Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema), Hashable (Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema), IsSql92ExpressionSyntax (Sql92ColumnSchemaExpressionSyntax columnSchema), Typeable columnSchema, Sql92DisplaySyntax columnSchema, Eq columnSchema, Hashable columnSchema) => IsSql92ColumnSchemaSyntax columnSchema where Source #
type Sql92ColumnSchemaColumnTypeSyntax columnSchema :: * Source #
type Sql92ColumnSchemaExpressionSyntax columnSchema :: * Source #
type Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema :: * Source #
:: Sql92ColumnSchemaColumnTypeSyntax columnSchema | Column type |
-> Maybe (Sql92ColumnSchemaExpressionSyntax columnSchema) | Default value |
-> [Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema] | Column constraints |
-> Maybe Text | Default collation |
-> columnSchema |
Instances
IsSql92ColumnSchemaSyntax SqlSyntaxBuilder Source # | |
Defined in Database.Beam.Migrate.SQL.Builder type Sql92ColumnSchemaColumnTypeSyntax SqlSyntaxBuilder Source # type Sql92ColumnSchemaExpressionSyntax SqlSyntaxBuilder Source # type Sql92ColumnSchemaColumnConstraintDefinitionSyntax SqlSyntaxBuilder Source # columnSchemaSyntax :: Sql92ColumnSchemaColumnTypeSyntax SqlSyntaxBuilder -> Maybe (Sql92ColumnSchemaExpressionSyntax SqlSyntaxBuilder) -> [Sql92ColumnSchemaColumnConstraintDefinitionSyntax SqlSyntaxBuilder] -> Maybe Text -> SqlSyntaxBuilder Source # | |
IsSql92ColumnSchemaSyntax HsColumnSchema Source # | |
class Typeable constraint => IsSql92TableConstraintSyntax constraint where Source #
primaryKeyConstraintSyntax :: [Text] -> constraint Source #
Instances
IsSql92TableConstraintSyntax SqlSyntaxBuilder Source # | |
Defined in Database.Beam.Migrate.SQL.Builder primaryKeyConstraintSyntax :: [Text] -> SqlSyntaxBuilder Source # | |
IsSql92TableConstraintSyntax HsTableConstraint Source # | |
Defined in Database.Beam.Haskell.Syntax |
class Typeable match => IsSql92MatchTypeSyntax match where Source #
fullMatchSyntax :: match Source #
partialMatchSyntax :: match Source #
Instances
IsSql92MatchTypeSyntax SqlSyntaxBuilder Source # | |
Defined in Database.Beam.Migrate.SQL.Builder fullMatchSyntax :: SqlSyntaxBuilder Source # partialMatchSyntax :: SqlSyntaxBuilder Source # | |
IsSql92MatchTypeSyntax HsNone Source # | |
Defined in Database.Beam.Haskell.Syntax | |
IsSql92MatchTypeSyntax BeamSerializedMatchType Source # | |
class Typeable refAction => IsSql92ReferentialActionSyntax refAction where Source #
referentialActionCascadeSyntax :: refAction Source #
referentialActionSetNullSyntax :: refAction Source #
referentialActionSetDefaultSyntax :: refAction Source #
referentialActionNoActionSyntax :: refAction Source #
Instances
IsSql92ReferentialActionSyntax SqlSyntaxBuilder Source # | |
Defined in Database.Beam.Migrate.SQL.Builder referentialActionCascadeSyntax :: SqlSyntaxBuilder Source # referentialActionSetNullSyntax :: SqlSyntaxBuilder Source # referentialActionSetDefaultSyntax :: SqlSyntaxBuilder Source # referentialActionNoActionSyntax :: SqlSyntaxBuilder Source # | |
IsSql92ReferentialActionSyntax HsNone Source # | |
IsSql92ReferentialActionSyntax BeamSerializedReferentialAction Source # | |
Defined in Database.Beam.Migrate.Serialization referentialActionCascadeSyntax :: BeamSerializedReferentialAction Source # referentialActionSetNullSyntax :: BeamSerializedReferentialAction Source # referentialActionSetDefaultSyntax :: BeamSerializedReferentialAction Source # referentialActionNoActionSyntax :: BeamSerializedReferentialAction Source # |
class (IsSql92ColumnConstraintSyntax (Sql92ColumnConstraintDefinitionConstraintSyntax constraint), IsSql92ConstraintAttributesSyntax (Sql92ColumnConstraintDefinitionAttributesSyntax constraint), Typeable constraint) => IsSql92ColumnConstraintDefinitionSyntax constraint where Source #
type Sql92ColumnConstraintDefinitionConstraintSyntax constraint :: * Source #
type Sql92ColumnConstraintDefinitionAttributesSyntax constraint :: * Source #
constraintDefinitionSyntax :: Maybe Text -> Sql92ColumnConstraintDefinitionConstraintSyntax constraint -> Maybe (Sql92ColumnConstraintDefinitionAttributesSyntax constraint) -> constraint Source #
Instances
IsSql92ColumnConstraintDefinitionSyntax SqlSyntaxBuilder Source # | |
Defined in Database.Beam.Migrate.SQL.Builder type Sql92ColumnConstraintDefinitionConstraintSyntax SqlSyntaxBuilder Source # type Sql92ColumnConstraintDefinitionAttributesSyntax SqlSyntaxBuilder Source # constraintDefinitionSyntax :: Maybe Text -> Sql92ColumnConstraintDefinitionConstraintSyntax SqlSyntaxBuilder -> Maybe (Sql92ColumnConstraintDefinitionAttributesSyntax SqlSyntaxBuilder) -> SqlSyntaxBuilder Source # | |
IsSql92ColumnConstraintDefinitionSyntax HsConstraintDefinition Source # | |
IsSql92ColumnConstraintDefinitionSyntax BeamSerializedConstraintDefinition Source # | |
class (Semigroup attrs, Monoid attrs, Typeable attrs) => IsSql92ConstraintAttributesSyntax attrs where Source #
initiallyDeferredAttributeSyntax :: attrs Source #
initiallyImmediateAttributeSyntax :: attrs Source #
notDeferrableAttributeSyntax :: attrs Source #
deferrableAttributeSyntax :: attrs Source #
Instances
class (IsSql92MatchTypeSyntax (Sql92ColumnConstraintMatchTypeSyntax constraint), IsSql92ReferentialActionSyntax (Sql92ColumnConstraintReferentialActionSyntax constraint), Typeable (Sql92ColumnConstraintExpressionSyntax constraint), Typeable constraint) => IsSql92ColumnConstraintSyntax constraint where Source #
type Sql92ColumnConstraintMatchTypeSyntax constraint :: * Source #
type Sql92ColumnConstraintReferentialActionSyntax constraint :: * Source #
type Sql92ColumnConstraintExpressionSyntax constraint :: * Source #
notNullConstraintSyntax :: constraint Source #
uniqueColumnConstraintSyntax :: constraint Source #
primaryKeyColumnConstraintSyntax :: constraint Source #
checkColumnConstraintSyntax :: Sql92ColumnConstraintExpressionSyntax constraint -> constraint Source #
referencesConstraintSyntax Source #
:: Text | |
-> [Text] | |
-> Maybe (Sql92ColumnConstraintMatchTypeSyntax constraint) | |
-> Maybe (Sql92ColumnConstraintReferentialActionSyntax constraint) | On update |
-> Maybe (Sql92ColumnConstraintReferentialActionSyntax constraint) | On delete |
-> constraint |
Instances
class Sql92SerializableDataTypeSyntax dataType where Source #
IsSql92DataTypeSyntax
es that can be serialized to JSON
serializeDataType :: dataType -> Value Source #
Instances
class Sql92SerializableConstraintDefinitionSyntax constraint where Source #
IsSql92ColumnConstraintDefinitionSyntax
es that can be serialized to JSON
serializeConstraint :: constraint -> Value Source #