module IHP.IDE.SchemaDesigner.Types where
import IHP.Prelude
data Statement
=
StatementCreateTable { Statement -> CreateTable
unsafeGetCreateTable :: CreateTable }
| CreateEnumType { Statement -> Text
name :: Text, Statement -> [Text]
values :: [Text] }
| DropEnumType { name :: Text }
| CreateExtension { name :: Text, Statement -> Bool
ifNotExists :: Bool }
| AddConstraint { Statement -> Text
tableName :: Text, Statement -> Constraint
constraint :: Constraint, Statement -> Maybe Bool
deferrable :: Maybe Bool, Statement -> Maybe DeferrableType
deferrableType :: Maybe DeferrableType }
| DropConstraint { tableName, Statement -> Text
constraintName :: Text }
| AddColumn { tableName :: Text, Statement -> Column
column :: Column }
| DropColumn { tableName :: Text, Statement -> Text
columnName :: Text }
| DropTable { tableName :: Text }
| UnknownStatement { Statement -> Text
raw :: Text }
| { Statement -> Text
content :: Text }
| CreateIndex { Statement -> Text
indexName :: Text, Statement -> Bool
unique :: Bool, tableName :: Text, Statement -> [IndexColumn]
columns :: [IndexColumn], Statement -> Maybe Expression
whereClause :: Maybe Expression, Statement -> Maybe IndexType
indexType :: Maybe IndexType }
| DropIndex { indexName :: Text }
| CreateFunction { Statement -> Text
functionName :: Text, Statement -> [(Text, PostgresType)]
functionArguments :: [(Text, PostgresType)], Statement -> Text
functionBody :: Text, Statement -> Bool
orReplace :: Bool, Statement -> PostgresType
returns :: PostgresType, Statement -> Text
language :: Text }
| EnableRowLevelSecurity { tableName :: Text }
| CreatePolicy { name :: Text, tableName :: Text, Statement -> Maybe PolicyAction
action :: Maybe PolicyAction, Statement -> Maybe Expression
using :: Maybe Expression, Statement -> Maybe Expression
check :: Maybe Expression }
| Set { name :: Text, Statement -> Expression
value :: Expression }
| SelectStatement { Statement -> Text
query :: Text }
| CreateSequence { name :: Text }
| RenameColumn { tableName :: Text, Statement -> Text
from :: Text, Statement -> Text
to :: Text }
| AddValueToEnumType { Statement -> Text
enumName :: Text, Statement -> Text
newValue :: Text, ifNotExists :: Bool }
| DropNotNull { tableName :: Text, columnName :: Text }
| SetNotNull { tableName :: Text, columnName :: Text }
| RenameTable { from :: Text, to :: Text }
| DropPolicy { tableName :: Text, Statement -> Text
policyName :: Text }
| SetDefaultValue { tableName :: Text, columnName :: Text, value :: Expression }
| DropDefaultValue { tableName :: Text, columnName :: Text }
| CreateTrigger { name :: !Text, Statement -> TriggerEventWhen
eventWhen :: !TriggerEventWhen, Statement -> TriggerEvent
event :: !TriggerEvent, tableName :: !Text, Statement -> TriggerFor
for :: !TriggerFor, Statement -> Maybe Expression
whenCondition :: Maybe Expression, functionName :: !Text, Statement -> [Expression]
arguments :: ![Expression] }
| DropTrigger { name :: !Text, tableName :: !Text }
| Begin
| Commit
| DropFunction { functionName :: !Text }
deriving (Statement -> Statement -> Bool
(Statement -> Statement -> Bool)
-> (Statement -> Statement -> Bool) -> Eq Statement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Statement -> Statement -> Bool
== :: Statement -> Statement -> Bool
$c/= :: Statement -> Statement -> Bool
/= :: Statement -> Statement -> Bool
Eq, Int -> Statement -> ShowS
[Statement] -> ShowS
Statement -> String
(Int -> Statement -> ShowS)
-> (Statement -> String)
-> ([Statement] -> ShowS)
-> Show Statement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Statement -> ShowS
showsPrec :: Int -> Statement -> ShowS
$cshow :: Statement -> String
show :: Statement -> String
$cshowList :: [Statement] -> ShowS
showList :: [Statement] -> ShowS
Show)
data DeferrableType
= InitiallyImmediate
| InitiallyDeferred
deriving (DeferrableType -> DeferrableType -> Bool
(DeferrableType -> DeferrableType -> Bool)
-> (DeferrableType -> DeferrableType -> Bool) -> Eq DeferrableType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeferrableType -> DeferrableType -> Bool
== :: DeferrableType -> DeferrableType -> Bool
$c/= :: DeferrableType -> DeferrableType -> Bool
/= :: DeferrableType -> DeferrableType -> Bool
Eq, Int -> DeferrableType -> ShowS
[DeferrableType] -> ShowS
DeferrableType -> String
(Int -> DeferrableType -> ShowS)
-> (DeferrableType -> String)
-> ([DeferrableType] -> ShowS)
-> Show DeferrableType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeferrableType -> ShowS
showsPrec :: Int -> DeferrableType -> ShowS
$cshow :: DeferrableType -> String
show :: DeferrableType -> String
$cshowList :: [DeferrableType] -> ShowS
showList :: [DeferrableType] -> ShowS
Show)
data CreateTable
= CreateTable
{ CreateTable -> Text
name :: Text
, CreateTable -> [Column]
columns :: [Column]
, CreateTable -> PrimaryKeyConstraint
primaryKeyConstraint :: PrimaryKeyConstraint
, CreateTable -> [Constraint]
constraints :: [Constraint]
, CreateTable -> Bool
unlogged :: !Bool
}
deriving (CreateTable -> CreateTable -> Bool
(CreateTable -> CreateTable -> Bool)
-> (CreateTable -> CreateTable -> Bool) -> Eq CreateTable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CreateTable -> CreateTable -> Bool
== :: CreateTable -> CreateTable -> Bool
$c/= :: CreateTable -> CreateTable -> Bool
/= :: CreateTable -> CreateTable -> Bool
Eq, Int -> CreateTable -> ShowS
[CreateTable] -> ShowS
CreateTable -> String
(Int -> CreateTable -> ShowS)
-> (CreateTable -> String)
-> ([CreateTable] -> ShowS)
-> Show CreateTable
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CreateTable -> ShowS
showsPrec :: Int -> CreateTable -> ShowS
$cshow :: CreateTable -> String
show :: CreateTable -> String
$cshowList :: [CreateTable] -> ShowS
showList :: [CreateTable] -> ShowS
Show)
data Column = Column
{ Column -> Text
name :: Text
, Column -> PostgresType
columnType :: PostgresType
, Column -> Maybe Expression
defaultValue :: Maybe Expression
, Column -> Bool
notNull :: Bool
, Column -> Bool
isUnique :: Bool
, Column -> Maybe ColumnGenerator
generator :: Maybe ColumnGenerator
}
deriving (Column -> Column -> Bool
(Column -> Column -> Bool)
-> (Column -> Column -> Bool) -> Eq Column
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Column -> Column -> Bool
== :: Column -> Column -> Bool
$c/= :: Column -> Column -> Bool
/= :: Column -> Column -> Bool
Eq, Int -> Column -> ShowS
[Column] -> ShowS
Column -> String
(Int -> Column -> ShowS)
-> (Column -> String) -> ([Column] -> ShowS) -> Show Column
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Column -> ShowS
showsPrec :: Int -> Column -> ShowS
$cshow :: Column -> String
show :: Column -> String
$cshowList :: [Column] -> ShowS
showList :: [Column] -> ShowS
Show)
data OnDelete
= NoAction
| Restrict
| SetNull
| SetDefault
| Cascade
deriving (Int -> OnDelete -> ShowS
[OnDelete] -> ShowS
OnDelete -> String
(Int -> OnDelete -> ShowS)
-> (OnDelete -> String) -> ([OnDelete] -> ShowS) -> Show OnDelete
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OnDelete -> ShowS
showsPrec :: Int -> OnDelete -> ShowS
$cshow :: OnDelete -> String
show :: OnDelete -> String
$cshowList :: [OnDelete] -> ShowS
showList :: [OnDelete] -> ShowS
Show, OnDelete -> OnDelete -> Bool
(OnDelete -> OnDelete -> Bool)
-> (OnDelete -> OnDelete -> Bool) -> Eq OnDelete
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OnDelete -> OnDelete -> Bool
== :: OnDelete -> OnDelete -> Bool
$c/= :: OnDelete -> OnDelete -> Bool
/= :: OnDelete -> OnDelete -> Bool
Eq)
data ColumnGenerator
= ColumnGenerator
{ ColumnGenerator -> Expression
generate :: !Expression
, ColumnGenerator -> Bool
stored :: !Bool
} deriving (Int -> ColumnGenerator -> ShowS
[ColumnGenerator] -> ShowS
ColumnGenerator -> String
(Int -> ColumnGenerator -> ShowS)
-> (ColumnGenerator -> String)
-> ([ColumnGenerator] -> ShowS)
-> Show ColumnGenerator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ColumnGenerator -> ShowS
showsPrec :: Int -> ColumnGenerator -> ShowS
$cshow :: ColumnGenerator -> String
show :: ColumnGenerator -> String
$cshowList :: [ColumnGenerator] -> ShowS
showList :: [ColumnGenerator] -> ShowS
Show, ColumnGenerator -> ColumnGenerator -> Bool
(ColumnGenerator -> ColumnGenerator -> Bool)
-> (ColumnGenerator -> ColumnGenerator -> Bool)
-> Eq ColumnGenerator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ColumnGenerator -> ColumnGenerator -> Bool
== :: ColumnGenerator -> ColumnGenerator -> Bool
$c/= :: ColumnGenerator -> ColumnGenerator -> Bool
/= :: ColumnGenerator -> ColumnGenerator -> Bool
Eq)
newtype PrimaryKeyConstraint
= PrimaryKeyConstraint { PrimaryKeyConstraint -> [Text]
primaryKeyColumnNames :: [Text] }
deriving (PrimaryKeyConstraint -> PrimaryKeyConstraint -> Bool
(PrimaryKeyConstraint -> PrimaryKeyConstraint -> Bool)
-> (PrimaryKeyConstraint -> PrimaryKeyConstraint -> Bool)
-> Eq PrimaryKeyConstraint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PrimaryKeyConstraint -> PrimaryKeyConstraint -> Bool
== :: PrimaryKeyConstraint -> PrimaryKeyConstraint -> Bool
$c/= :: PrimaryKeyConstraint -> PrimaryKeyConstraint -> Bool
/= :: PrimaryKeyConstraint -> PrimaryKeyConstraint -> Bool
Eq, Int -> PrimaryKeyConstraint -> ShowS
[PrimaryKeyConstraint] -> ShowS
PrimaryKeyConstraint -> String
(Int -> PrimaryKeyConstraint -> ShowS)
-> (PrimaryKeyConstraint -> String)
-> ([PrimaryKeyConstraint] -> ShowS)
-> Show PrimaryKeyConstraint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PrimaryKeyConstraint -> ShowS
showsPrec :: Int -> PrimaryKeyConstraint -> ShowS
$cshow :: PrimaryKeyConstraint -> String
show :: PrimaryKeyConstraint -> String
$cshowList :: [PrimaryKeyConstraint] -> ShowS
showList :: [PrimaryKeyConstraint] -> ShowS
Show)
data Constraint
= ForeignKeyConstraint
{ Constraint -> Maybe Text
name :: !(Maybe Text)
, Constraint -> Text
columnName :: !Text
, Constraint -> Text
referenceTable :: !Text
, Constraint -> Maybe Text
referenceColumn :: !(Maybe Text)
, Constraint -> Maybe OnDelete
onDelete :: !(Maybe OnDelete)
}
| UniqueConstraint
{ name :: !(Maybe Text)
, Constraint -> [Text]
columnNames :: ![Text]
}
| CheckConstraint
{ name :: !(Maybe Text)
, Constraint -> Expression
checkExpression :: !Expression
}
| ExcludeConstraint
{ name :: !(Maybe Text)
, Constraint -> [ExcludeConstraintElement]
excludeElements :: ![ExcludeConstraintElement]
, Constraint -> Maybe Expression
predicate :: !(Maybe Expression)
, Constraint -> Maybe IndexType
indexType :: !(Maybe IndexType)
}
| AlterTableAddPrimaryKey
{ name :: !(Maybe Text)
, Constraint -> PrimaryKeyConstraint
primaryKeyConstraint :: !PrimaryKeyConstraint
}
deriving (Constraint -> Constraint -> Bool
(Constraint -> Constraint -> Bool)
-> (Constraint -> Constraint -> Bool) -> Eq Constraint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Constraint -> Constraint -> Bool
== :: Constraint -> Constraint -> Bool
$c/= :: Constraint -> Constraint -> Bool
/= :: Constraint -> Constraint -> Bool
Eq, Int -> Constraint -> ShowS
[Constraint] -> ShowS
Constraint -> String
(Int -> Constraint -> ShowS)
-> (Constraint -> String)
-> ([Constraint] -> ShowS)
-> Show Constraint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Constraint -> ShowS
showsPrec :: Int -> Constraint -> ShowS
$cshow :: Constraint -> String
show :: Constraint -> String
$cshowList :: [Constraint] -> ShowS
showList :: [Constraint] -> ShowS
Show)
data ExcludeConstraintElement = ExcludeConstraintElement { ExcludeConstraintElement -> Text
element :: !Text, ExcludeConstraintElement -> Text
operator :: !Text }
deriving (ExcludeConstraintElement -> ExcludeConstraintElement -> Bool
(ExcludeConstraintElement -> ExcludeConstraintElement -> Bool)
-> (ExcludeConstraintElement -> ExcludeConstraintElement -> Bool)
-> Eq ExcludeConstraintElement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExcludeConstraintElement -> ExcludeConstraintElement -> Bool
== :: ExcludeConstraintElement -> ExcludeConstraintElement -> Bool
$c/= :: ExcludeConstraintElement -> ExcludeConstraintElement -> Bool
/= :: ExcludeConstraintElement -> ExcludeConstraintElement -> Bool
Eq, Int -> ExcludeConstraintElement -> ShowS
[ExcludeConstraintElement] -> ShowS
ExcludeConstraintElement -> String
(Int -> ExcludeConstraintElement -> ShowS)
-> (ExcludeConstraintElement -> String)
-> ([ExcludeConstraintElement] -> ShowS)
-> Show ExcludeConstraintElement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExcludeConstraintElement -> ShowS
showsPrec :: Int -> ExcludeConstraintElement -> ShowS
$cshow :: ExcludeConstraintElement -> String
show :: ExcludeConstraintElement -> String
$cshowList :: [ExcludeConstraintElement] -> ShowS
showList :: [ExcludeConstraintElement] -> ShowS
Show)
data Expression =
TextExpression Text
| VarExpression Text
| CallExpression Text [Expression]
| NotEqExpression Expression Expression
| EqExpression Expression Expression
| AndExpression Expression Expression
| IsExpression Expression Expression
| InExpression Expression Expression
| NotExpression Expression
| ExistsExpression Expression
| OrExpression Expression Expression
| LessThanExpression Expression Expression
| LessThanOrEqualToExpression Expression Expression
| GreaterThanExpression Expression Expression
| GreaterThanOrEqualToExpression Expression Expression
| DoubleExpression Double
| IntExpression Int
| TypeCastExpression Expression PostgresType
| SelectExpression Select
| DotExpression Expression Text
| ConcatenationExpression Expression Expression
deriving (Expression -> Expression -> Bool
(Expression -> Expression -> Bool)
-> (Expression -> Expression -> Bool) -> Eq Expression
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Expression -> Expression -> Bool
== :: Expression -> Expression -> Bool
$c/= :: Expression -> Expression -> Bool
/= :: Expression -> Expression -> Bool
Eq, Int -> Expression -> ShowS
[Expression] -> ShowS
Expression -> String
(Int -> Expression -> ShowS)
-> (Expression -> String)
-> ([Expression] -> ShowS)
-> Show Expression
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Expression -> ShowS
showsPrec :: Int -> Expression -> ShowS
$cshow :: Expression -> String
show :: Expression -> String
$cshowList :: [Expression] -> ShowS
showList :: [Expression] -> ShowS
Show)
data Select = Select
{ Select -> [Expression]
columns :: [Expression]
, Select -> Expression
from :: Expression
, Select -> Maybe Text
alias :: Maybe Text
, Select -> Expression
whereClause :: Expression
} deriving (Select -> Select -> Bool
(Select -> Select -> Bool)
-> (Select -> Select -> Bool) -> Eq Select
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Select -> Select -> Bool
== :: Select -> Select -> Bool
$c/= :: Select -> Select -> Bool
/= :: Select -> Select -> Bool
Eq, Int -> Select -> ShowS
[Select] -> ShowS
Select -> String
(Int -> Select -> ShowS)
-> (Select -> String) -> ([Select] -> ShowS) -> Show Select
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Select -> ShowS
showsPrec :: Int -> Select -> ShowS
$cshow :: Select -> String
show :: Select -> String
$cshowList :: [Select] -> ShowS
showList :: [Select] -> ShowS
Show)
data PostgresType
= PUUID
| PText
| PInt
| PSmallInt
| PBigInt
| PBoolean
| PTimestampWithTimezone
| PTimestamp
| PReal
| PDouble
| PPoint
| PPolygon
| PDate
| PBinary
| PTime
| PInterval { PostgresType -> Maybe Text
fields :: Maybe Text }
| PNumeric { PostgresType -> Maybe Int
precision :: Maybe Int, PostgresType -> Maybe Int
scale :: Maybe Int }
| PVaryingN (Maybe Int)
| PCharacterN Int
| PSingleChar
| PSerial
| PBigserial
| PJSONB
| PInet
| PTSVector
| PArray PostgresType
| PTrigger
| PCustomType Text
deriving (PostgresType -> PostgresType -> Bool
(PostgresType -> PostgresType -> Bool)
-> (PostgresType -> PostgresType -> Bool) -> Eq PostgresType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PostgresType -> PostgresType -> Bool
== :: PostgresType -> PostgresType -> Bool
$c/= :: PostgresType -> PostgresType -> Bool
/= :: PostgresType -> PostgresType -> Bool
Eq, Int -> PostgresType -> ShowS
[PostgresType] -> ShowS
PostgresType -> String
(Int -> PostgresType -> ShowS)
-> (PostgresType -> String)
-> ([PostgresType] -> ShowS)
-> Show PostgresType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PostgresType -> ShowS
showsPrec :: Int -> PostgresType -> ShowS
$cshow :: PostgresType -> String
show :: PostgresType -> String
$cshowList :: [PostgresType] -> ShowS
showList :: [PostgresType] -> ShowS
Show)
data TriggerEventWhen
= Before
| After
| InsteadOf
deriving (TriggerEventWhen -> TriggerEventWhen -> Bool
(TriggerEventWhen -> TriggerEventWhen -> Bool)
-> (TriggerEventWhen -> TriggerEventWhen -> Bool)
-> Eq TriggerEventWhen
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TriggerEventWhen -> TriggerEventWhen -> Bool
== :: TriggerEventWhen -> TriggerEventWhen -> Bool
$c/= :: TriggerEventWhen -> TriggerEventWhen -> Bool
/= :: TriggerEventWhen -> TriggerEventWhen -> Bool
Eq, Int -> TriggerEventWhen -> ShowS
[TriggerEventWhen] -> ShowS
TriggerEventWhen -> String
(Int -> TriggerEventWhen -> ShowS)
-> (TriggerEventWhen -> String)
-> ([TriggerEventWhen] -> ShowS)
-> Show TriggerEventWhen
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TriggerEventWhen -> ShowS
showsPrec :: Int -> TriggerEventWhen -> ShowS
$cshow :: TriggerEventWhen -> String
show :: TriggerEventWhen -> String
$cshowList :: [TriggerEventWhen] -> ShowS
showList :: [TriggerEventWhen] -> ShowS
Show)
data TriggerEvent
= TriggerOnInsert
| TriggerOnUpdate
| TriggerOnDelete
| TriggerOnTruncate
deriving (TriggerEvent -> TriggerEvent -> Bool
(TriggerEvent -> TriggerEvent -> Bool)
-> (TriggerEvent -> TriggerEvent -> Bool) -> Eq TriggerEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TriggerEvent -> TriggerEvent -> Bool
== :: TriggerEvent -> TriggerEvent -> Bool
$c/= :: TriggerEvent -> TriggerEvent -> Bool
/= :: TriggerEvent -> TriggerEvent -> Bool
Eq, Int -> TriggerEvent -> ShowS
[TriggerEvent] -> ShowS
TriggerEvent -> String
(Int -> TriggerEvent -> ShowS)
-> (TriggerEvent -> String)
-> ([TriggerEvent] -> ShowS)
-> Show TriggerEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TriggerEvent -> ShowS
showsPrec :: Int -> TriggerEvent -> ShowS
$cshow :: TriggerEvent -> String
show :: TriggerEvent -> String
$cshowList :: [TriggerEvent] -> ShowS
showList :: [TriggerEvent] -> ShowS
Show)
data TriggerFor
= ForEachRow
| ForEachStatement
deriving (TriggerFor -> TriggerFor -> Bool
(TriggerFor -> TriggerFor -> Bool)
-> (TriggerFor -> TriggerFor -> Bool) -> Eq TriggerFor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TriggerFor -> TriggerFor -> Bool
== :: TriggerFor -> TriggerFor -> Bool
$c/= :: TriggerFor -> TriggerFor -> Bool
/= :: TriggerFor -> TriggerFor -> Bool
Eq, Int -> TriggerFor -> ShowS
[TriggerFor] -> ShowS
TriggerFor -> String
(Int -> TriggerFor -> ShowS)
-> (TriggerFor -> String)
-> ([TriggerFor] -> ShowS)
-> Show TriggerFor
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TriggerFor -> ShowS
showsPrec :: Int -> TriggerFor -> ShowS
$cshow :: TriggerFor -> String
show :: TriggerFor -> String
$cshowList :: [TriggerFor] -> ShowS
showList :: [TriggerFor] -> ShowS
Show)
data PolicyAction
= PolicyForAll
| PolicyForSelect
| PolicyForInsert
| PolicyForUpdate
| PolicyForDelete
deriving (PolicyAction -> PolicyAction -> Bool
(PolicyAction -> PolicyAction -> Bool)
-> (PolicyAction -> PolicyAction -> Bool) -> Eq PolicyAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PolicyAction -> PolicyAction -> Bool
== :: PolicyAction -> PolicyAction -> Bool
$c/= :: PolicyAction -> PolicyAction -> Bool
/= :: PolicyAction -> PolicyAction -> Bool
Eq, Int -> PolicyAction -> ShowS
[PolicyAction] -> ShowS
PolicyAction -> String
(Int -> PolicyAction -> ShowS)
-> (PolicyAction -> String)
-> ([PolicyAction] -> ShowS)
-> Show PolicyAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PolicyAction -> ShowS
showsPrec :: Int -> PolicyAction -> ShowS
$cshow :: PolicyAction -> String
show :: PolicyAction -> String
$cshowList :: [PolicyAction] -> ShowS
showList :: [PolicyAction] -> ShowS
Show)
data IndexType = Btree | Gin | Gist
deriving (IndexType -> IndexType -> Bool
(IndexType -> IndexType -> Bool)
-> (IndexType -> IndexType -> Bool) -> Eq IndexType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IndexType -> IndexType -> Bool
== :: IndexType -> IndexType -> Bool
$c/= :: IndexType -> IndexType -> Bool
/= :: IndexType -> IndexType -> Bool
Eq, Int -> IndexType -> ShowS
[IndexType] -> ShowS
IndexType -> String
(Int -> IndexType -> ShowS)
-> (IndexType -> String)
-> ([IndexType] -> ShowS)
-> Show IndexType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IndexType -> ShowS
showsPrec :: Int -> IndexType -> ShowS
$cshow :: IndexType -> String
show :: IndexType -> String
$cshowList :: [IndexType] -> ShowS
showList :: [IndexType] -> ShowS
Show)
data IndexColumn
= IndexColumn { IndexColumn -> Expression
column :: Expression, IndexColumn -> [IndexColumnOrder]
columnOrder :: [IndexColumnOrder] }
deriving (IndexColumn -> IndexColumn -> Bool
(IndexColumn -> IndexColumn -> Bool)
-> (IndexColumn -> IndexColumn -> Bool) -> Eq IndexColumn
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IndexColumn -> IndexColumn -> Bool
== :: IndexColumn -> IndexColumn -> Bool
$c/= :: IndexColumn -> IndexColumn -> Bool
/= :: IndexColumn -> IndexColumn -> Bool
Eq, Int -> IndexColumn -> ShowS
[IndexColumn] -> ShowS
IndexColumn -> String
(Int -> IndexColumn -> ShowS)
-> (IndexColumn -> String)
-> ([IndexColumn] -> ShowS)
-> Show IndexColumn
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IndexColumn -> ShowS
showsPrec :: Int -> IndexColumn -> ShowS
$cshow :: IndexColumn -> String
show :: IndexColumn -> String
$cshowList :: [IndexColumn] -> ShowS
showList :: [IndexColumn] -> ShowS
Show)
data IndexColumnOrder
= Asc | Desc | NullsFirst | NullsLast
deriving (IndexColumnOrder -> IndexColumnOrder -> Bool
(IndexColumnOrder -> IndexColumnOrder -> Bool)
-> (IndexColumnOrder -> IndexColumnOrder -> Bool)
-> Eq IndexColumnOrder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IndexColumnOrder -> IndexColumnOrder -> Bool
== :: IndexColumnOrder -> IndexColumnOrder -> Bool
$c/= :: IndexColumnOrder -> IndexColumnOrder -> Bool
/= :: IndexColumnOrder -> IndexColumnOrder -> Bool
Eq, Int -> IndexColumnOrder -> ShowS
[IndexColumnOrder] -> ShowS
IndexColumnOrder -> String
(Int -> IndexColumnOrder -> ShowS)
-> (IndexColumnOrder -> String)
-> ([IndexColumnOrder] -> ShowS)
-> Show IndexColumnOrder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IndexColumnOrder -> ShowS
showsPrec :: Int -> IndexColumnOrder -> ShowS
$cshow :: IndexColumnOrder -> String
show :: IndexColumnOrder -> String
$cshowList :: [IndexColumnOrder] -> ShowS
showList :: [IndexColumnOrder] -> ShowS
Show)