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

Safe HaskellNone
LanguageHaskell2010

Database.Beam.Migrate.SQL.SQL92

Contents

Description

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

Convenience type synonyms

type Sql92SaneDdlCommandSyntax cmd = (Sql92SaneDdlCommandSyntaxMigrateOnly 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.

class Sql92DisplaySyntax syntax where Source #

Type classes for syntaxes which can be displayed

Minimal complete definition

displaySyntax

Methods

displaySyntax :: syntax -> String Source #

Render the syntax as a String, representing the SQL expression it stands for

class (IsSql92CreateTableSyntax (Sql92DdlCommandCreateTableSyntax syntax), IsSql92DropTableSyntax (Sql92DdlCommandDropTableSyntax syntax), IsSql92AlterTableSyntax (Sql92DdlCommandAlterTableSyntax syntax)) => IsSql92DdlCommandSyntax syntax where Source #

Minimal complete definition

createTableCmd, dropTableCmd, alterTableCmd

class (IsSql92TableConstraintSyntax (Sql92CreateTableTableConstraintSyntax syntax), IsSql92ColumnSchemaSyntax (Sql92CreateTableColumnSchemaSyntax syntax)) => IsSql92CreateTableSyntax syntax where Source #

Minimal complete definition

createTableSyntax

class (IsSql92ColumnSchemaSyntax (Sql92AlterTableColumnSchemaSyntax syntax), IsSql92AlterColumnActionSyntax (Sql92AlterTableAlterColumnActionSyntax syntax)) => IsSql92AlterTableActionSyntax syntax where Source #

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 #

Minimal complete definition

columnSchemaSyntax

Methods

columnSchemaSyntax Source #

Arguments

:: Sql92ColumnSchemaColumnTypeSyntax columnSchema

Column type

-> Maybe (Sql92ColumnSchemaExpressionSyntax columnSchema)

Default value

-> [Sql92ColumnSchemaColumnConstraintDefinitionSyntax columnSchema]

Column constraints

-> Maybe Text

Default collation

-> columnSchema 

class Typeable refAction => IsSql92ReferentialActionSyntax refAction where Source #

class (IsSql92ColumnConstraintSyntax (Sql92ColumnConstraintDefinitionConstraintSyntax constraint), IsSql92ConstraintAttributesSyntax (Sql92ColumnConstraintDefinitionAttributesSyntax constraint), Typeable constraint) => IsSql92ColumnConstraintDefinitionSyntax constraint where Source #

Minimal complete definition

constraintDefinitionSyntax

Instances
IsSql92ColumnConstraintDefinitionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Migrate.SQL.Builder

IsSql92ColumnConstraintDefinitionSyntax BeamSerializedConstraintDefinition Source # 
Instance details

Defined in Database.Beam.Migrate.Serialization

IsSql92ColumnConstraintDefinitionSyntax HsConstraintDefinition Source # 
Instance details

Defined in Database.Beam.Haskell.Syntax

class (Semigroup attrs, Monoid attrs, Typeable attrs) => IsSql92ConstraintAttributesSyntax attrs where Source #

class (IsSql92MatchTypeSyntax (Sql92ColumnConstraintMatchTypeSyntax constraint), IsSql92ReferentialActionSyntax (Sql92ColumnConstraintReferentialActionSyntax constraint), Typeable (Sql92ColumnConstraintExpressionSyntax constraint), Typeable constraint) => IsSql92ColumnConstraintSyntax constraint where Source #

Instances
IsSql92ColumnConstraintSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Migrate.SQL.Builder

IsSql92ColumnConstraintSyntax BeamSerializedConstraint Source # 
Instance details

Defined in Database.Beam.Migrate.Serialization

IsSql92ColumnConstraintSyntax HsExpr Source # 
Instance details

Defined in Database.Beam.Haskell.Syntax

class Sql92SerializableDataTypeSyntax dataType where Source #

IsSql92DataTypeSyntaxes that can be serialized to JSON

Minimal complete definition

serializeDataType

Methods

serializeDataType :: dataType -> Value Source #