squeal-postgresql-0.9.0.0: Squeal PostgreSQL Library
Copyright(c) Eitan Chatav 2019
Maintainereitan@morphism.tech
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Squeal.PostgreSQL.Definition

Contents

Description

data definition language

Synopsis

Definition

newtype Definition (db0 :: SchemasType) (db1 :: SchemasType) Source #

A Definition is a statement that changes the schemas of the database, like a createTable, dropTable, or alterTable command. Definitions may be composed using the >>> operator.

Instances

Instances details
Category Definition Source # 
Instance details

Defined in Squeal.PostgreSQL.Definition

Methods

id :: forall (a :: k). Definition a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Definition b c -> Definition a b -> Definition a c #

Migratory Definition (Indexed PQ IO ()) Source #

pure migrations

Instance details

Defined in Squeal.PostgreSQL.Session.Migration

Methods

runMigrations :: forall (db0 :: k) (db1 :: k). Path (Migration Definition) db0 db1 -> Indexed PQ IO () db0 db1 Source #

Migratory (IsoQ Definition) (IsoQ (Indexed PQ IO ())) Source #

pure rewindable migrations

Instance details

Defined in Squeal.PostgreSQL.Session.Migration

Methods

runMigrations :: forall (db0 :: k) (db1 :: k). Path (Migration (IsoQ Definition)) db0 db1 -> IsoQ (Indexed PQ IO ()) db0 db1 Source #

Migratory (OpQ Definition) (OpQ (Indexed PQ IO ())) Source #

pure rewinds

Instance details

Defined in Squeal.PostgreSQL.Session.Migration

Methods

runMigrations :: forall (db0 :: k) (db1 :: k). Path (Migration (OpQ Definition)) db0 db1 -> OpQ (Indexed PQ IO ()) db0 db1 Source #

Eq (Definition db0 db1) Source # 
Instance details

Defined in Squeal.PostgreSQL.Definition

Methods

(==) :: Definition db0 db1 -> Definition db0 db1 -> Bool #

(/=) :: Definition db0 db1 -> Definition db0 db1 -> Bool #

Ord (Definition db0 db1) Source # 
Instance details

Defined in Squeal.PostgreSQL.Definition

Methods

compare :: Definition db0 db1 -> Definition db0 db1 -> Ordering #

(<) :: Definition db0 db1 -> Definition db0 db1 -> Bool #

(<=) :: Definition db0 db1 -> Definition db0 db1 -> Bool #

(>) :: Definition db0 db1 -> Definition db0 db1 -> Bool #

(>=) :: Definition db0 db1 -> Definition db0 db1 -> Bool #

max :: Definition db0 db1 -> Definition db0 db1 -> Definition db0 db1 #

min :: Definition db0 db1 -> Definition db0 db1 -> Definition db0 db1 #

Show (Definition db0 db1) Source # 
Instance details

Defined in Squeal.PostgreSQL.Definition

Methods

showsPrec :: Int -> Definition db0 db1 -> ShowS #

show :: Definition db0 db1 -> String #

showList :: [Definition db0 db1] -> ShowS #

Generic (Definition db0 db1) Source # 
Instance details

Defined in Squeal.PostgreSQL.Definition

Associated Types

type Rep (Definition db0 db1) :: Type -> Type #

Methods

from :: Definition db0 db1 -> Rep (Definition db0 db1) x #

to :: Rep (Definition db0 db1) x -> Definition db0 db1 #

db0 ~ db1 => Semigroup (Definition db0 db1) Source # 
Instance details

Defined in Squeal.PostgreSQL.Definition

Methods

(<>) :: Definition db0 db1 -> Definition db0 db1 -> Definition db0 db1 #

sconcat :: NonEmpty (Definition db0 db1) -> Definition db0 db1 #

stimes :: Integral b => b -> Definition db0 db1 -> Definition db0 db1 #

db0 ~ db1 => Monoid (Definition db0 db1) Source # 
Instance details

Defined in Squeal.PostgreSQL.Definition

Methods

mempty :: Definition db0 db1 #

mappend :: Definition db0 db1 -> Definition db0 db1 -> Definition db0 db1 #

mconcat :: [Definition db0 db1] -> Definition db0 db1 #

NFData (Definition db0 db1) Source # 
Instance details

Defined in Squeal.PostgreSQL.Definition

Methods

rnf :: Definition db0 db1 -> () #

RenderSQL (Definition db0 db1) Source # 
Instance details

Defined in Squeal.PostgreSQL.Definition

Methods

renderSQL :: Definition db0 db1 -> ByteString Source #

type Rep (Definition db0 db1) Source # 
Instance details

Defined in Squeal.PostgreSQL.Definition

type Rep (Definition db0 db1) = D1 ('MetaData "Definition" "Squeal.PostgreSQL.Definition" "squeal-postgresql-0.9.0.0-D17NIjlcsGRAwJTaCTXyvM" 'True) (C1 ('MetaCons "UnsafeDefinition" 'PrefixI 'True) (S1 ('MetaSel ('Just "renderDefinition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

(>>>) :: forall k cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c infixr 1 #

Left-to-right composition

manipulation_ Source #

Arguments

:: Manipulation '[] db '[] '[]

no input or output

-> Definition db db 

A Manipulation without input or output can be run as a statement along with other Definitions, by embedding it using manipulation_.