Copyright | Flipstone Technology Partners 2023 |
---|---|
License | MIT |
Stability | Stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Since: 1.0.0.0
Synopsis
- data CreateIndexExpr
- createIndexExpr :: IndexUniqueness -> Maybe ConcurrentlyExpr -> Qualified TableName -> NonEmpty ColumnName -> CreateIndexExpr
- data IndexUniqueness
- data IndexBodyExpr
- indexBodyColumns :: NonEmpty ColumnName -> IndexBodyExpr
- data ConcurrentlyExpr
- concurrently :: ConcurrentlyExpr
- data DropIndexExpr
- dropIndexExpr :: IndexName -> DropIndexExpr
- createNamedIndexExpr :: IndexUniqueness -> Maybe ConcurrentlyExpr -> Qualified TableName -> IndexName -> IndexBodyExpr -> CreateIndexExpr
Documentation
data CreateIndexExpr Source #
Type to represent a SQL "CREATE INDEX" statement. E.G.
CREATE INDEX ON table (foo, bar, baz)
CreateIndexExpr
provides a SqlExpression
instance. See
unsafeSqlExpression
for how to construct a value with your own custom
SQL.
Since: 1.0.0.0
Instances
SqlExpression CreateIndexExpr Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Index toRawSql :: CreateIndexExpr -> RawSql Source # |
createIndexExpr :: IndexUniqueness -> Maybe ConcurrentlyExpr -> Qualified TableName -> NonEmpty ColumnName -> CreateIndexExpr Source #
Construct a SQL CREATE INDEX from an indicator of if the index should be
unique, a table, and corresponding collection of ColumnName
s.
Since: 1.0.0.0
data IndexUniqueness Source #
Type to represent if an index should be unique.
Since: 1.0.0.0
Instances
Show IndexUniqueness Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Index showsPrec :: Int -> IndexUniqueness -> ShowS # show :: IndexUniqueness -> String # showList :: [IndexUniqueness] -> ShowS # | |
Eq IndexUniqueness Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Index (==) :: IndexUniqueness -> IndexUniqueness -> Bool # (/=) :: IndexUniqueness -> IndexUniqueness -> Bool # | |
Ord IndexUniqueness Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Index compare :: IndexUniqueness -> IndexUniqueness -> Ordering # (<) :: IndexUniqueness -> IndexUniqueness -> Bool # (<=) :: IndexUniqueness -> IndexUniqueness -> Bool # (>) :: IndexUniqueness -> IndexUniqueness -> Bool # (>=) :: IndexUniqueness -> IndexUniqueness -> Bool # max :: IndexUniqueness -> IndexUniqueness -> IndexUniqueness # min :: IndexUniqueness -> IndexUniqueness -> IndexUniqueness # |
data IndexBodyExpr Source #
Type to represent the body of an index definition E.G.
(foo, bar)
in
CREATE some_index ON some_table (foo, bar)
IndexBodyExpr
provides a SqlExpression
instance. See
unsafeSqlExpression
for how to construct a value with your own custom
SQL.
Since: 1.0.0.0
Instances
SqlExpression IndexBodyExpr Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Index toRawSql :: IndexBodyExpr -> RawSql Source # |
indexBodyColumns :: NonEmpty ColumnName -> IndexBodyExpr Source #
Creates an IndexBodyExpr
for the given column names. The resulting
SQL looks like (column1, column2, ...)
.
Since: 1.0.0.0
data ConcurrentlyExpr Source #
Type to represent the CONCURRENTLY
keyword for index creation. E.G.
CONCURRENTLY
ConcurrentlyExpr
provides a SqlExpression
instance. See
unsafeSqlExpression
for how to construct a value with your own custom
SQL.
Since: 1.0.0.0
Instances
SqlExpression ConcurrentlyExpr Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Index |
concurrently :: ConcurrentlyExpr Source #
The CONCURRENTLY
keyword indicates to PostgreSQL that an index should be
created concurrently.
Since: 1.0.0.0
data DropIndexExpr Source #
Type to represent a SQL "DROP INDEX" statement. E.G.
DROP INDEX foo
DropIndexExpr
provides a SqlExpression
instance. See
unsafeSqlExpression
for how to construct a value with your own custom
SQL.
Since: 1.0.0.0
Instances
SqlExpression DropIndexExpr Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Index toRawSql :: DropIndexExpr -> RawSql Source # |
dropIndexExpr :: IndexName -> DropIndexExpr Source #
Construct a SQL DROP INDEX for a given IndexName
.
Since: 1.0.0.0
createNamedIndexExpr :: IndexUniqueness -> Maybe ConcurrentlyExpr -> Qualified TableName -> IndexName -> IndexBodyExpr -> CreateIndexExpr Source #
Construct a SQL CREATE INDEX from an indicator of if the index should be unique, a table, a name for the index, and some SQL representing the rest of the index creation.
Since: 1.0.0.0