beam-automigrate-0.1.0.1: DB migration library for beam, targeting Postgres.

Safe HaskellNone
LanguageHaskell2010

Database.Beam.AutoMigrate.Compat

Description

This is a module which adapts and simplifies certain things normally provided by "beam-migrate", but without the extra complication of importing and using the library itself.

Documentation

class HasColumnType ty where Source #

Minimal complete definition

defaultColumnType

Methods

defaultColumnType :: Proxy ty -> ColumnType Source #

Provide a ColumnType for the given type

defaultTypeCast :: Proxy ty -> Maybe Text Source #

defaultEnums :: Proxy ty -> Enumerations Source #

If ty maps to a DB ENUM, use this method to specify which one.

Instances
HasColumnType Bool Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType Double Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType Int Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType Int16 Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType Int32 Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType Int64 Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType Word Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType Word16 Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType Word32 Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType Word64 Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType ByteString Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType Scientific Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType Text Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType UTCTime Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType SqlBitString Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType LocalTime Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType TimeOfDay Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType Day Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType UUID Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType ty => HasColumnType (Maybe ty) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

(Integral ty, HasColumnType ty) => HasColumnType (SqlSerial ty) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

(FromJSON a, ToJSON a) => HasColumnType (PgJSON a) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

(FromJSON a, ToJSON a) => HasColumnType (PgJSONB a) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

(Show a, Typeable a, Enum a, Bounded a) => HasColumnType (DbEnum a) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

(Show a, Typeable a, Enum a, Bounded a) => HasColumnType (PgEnum a) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType ty => HasColumnType (TableField e ty) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType (PgRange PgInt4Range a) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType (PgRange PgInt8Range a) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType (PgRange PgNumRange a) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType (PgRange PgTsRange a) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType (PgRange PgTsTzRange a) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasColumnType (PgRange PgDateRange a) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

class Ord (SchemaConstraint ty) => HasSchemaConstraints ty where Source #

Minimal complete definition

Nothing

Methods

schemaConstraints :: Proxy ty -> Set (SchemaConstraint ty) Source #

Provide arbitrary constraints on a field of the requested type.

Instances
(IsMaybe a ~ nullary, HasSchemaConstraints' nullary a) => HasSchemaConstraints a Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

class Ord (SchemaConstraint ty) => HasSchemaConstraints' (nullary :: Bool) ty where Source #

Methods

schemaConstraints' :: Proxy nullary -> Proxy ty -> Set (SchemaConstraint ty) Source #

Instances
HasSchemaConstraints' False (TableEntity tbl) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasSchemaConstraints' True (TableEntity tbl) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasSchemaConstraints' False (TableField e t) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasSchemaConstraints' False (TableField e (TableField e t)) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasSchemaConstraints' True (TableField e (Maybe t)) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

HasSchemaConstraints' True (TableField e (TableField e t)) Source # 
Instance details

Defined in Database.Beam.AutoMigrate.Compat

type family IsMaybe (k :: *) :: Bool where ... Source #

Equations

IsMaybe (Maybe x) = True 
IsMaybe (TableField t (Maybe x)) = True 
IsMaybe (TableField t _) = False 
IsMaybe _ = False