beam-migrate-0.3.2.0: 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 IsSql92DropTableSyntax syntax where Source #

Minimal complete definition

dropTableSyntax

Methods

dropTableSyntax :: Text -> syntax 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 (IsSql92ColumnConstraintSyntax (Sql92ColumnConstraintDefinitionConstraintSyntax constraint), IsSql92ConstraintAttributesSyntax (Sql92ColumnConstraintDefinitionAttributesSyntax constraint), Typeable constraint) => IsSql92ColumnConstraintDefinitionSyntax constraint where Source #

Minimal complete definition

constraintDefinitionSyntax

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

Instances

IsSql92ColumnConstraintSyntax BeamSerializedConstraint Source # 
IsSql92ColumnConstraintSyntax HsExpr Source # 

class Sql92SerializableDataTypeSyntax dataType where Source #

IsSql92DataTypeSyntaxes that can be serialized to JSON

Minimal complete definition

serializeDataType

Methods

serializeDataType :: dataType -> Value Source #