Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data TableIndex = TableIndex {
- idxColumns :: [RawSQL ()]
- idxInclude :: [RawSQL ()]
- idxMethod :: IndexMethod
- idxUnique :: Bool
- idxValid :: Bool
- idxWhere :: Maybe (RawSQL ())
- data IndexMethod
- tblIndex :: TableIndex
- indexOnColumn :: RawSQL () -> TableIndex
- indexOnColumns :: [RawSQL ()] -> TableIndex
- indexOnColumnWithMethod :: RawSQL () -> IndexMethod -> TableIndex
- indexOnColumnsWithMethod :: [RawSQL ()] -> IndexMethod -> TableIndex
- uniqueIndexOnColumn :: RawSQL () -> TableIndex
- uniqueIndexOnColumnWithCondition :: RawSQL () -> RawSQL () -> TableIndex
- uniqueIndexOnColumns :: [RawSQL ()] -> TableIndex
- indexName :: RawSQL () -> TableIndex -> RawSQL ()
- sqlCreateIndexMaybeDowntime :: RawSQL () -> TableIndex -> RawSQL ()
- sqlCreateIndexConcurrently :: RawSQL () -> TableIndex -> RawSQL ()
- sqlDropIndexMaybeDowntime :: RawSQL () -> TableIndex -> RawSQL ()
- sqlDropIndexConcurrently :: RawSQL () -> TableIndex -> RawSQL ()
Documentation
data TableIndex Source #
TableIndex | |
|
Instances
Eq TableIndex Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Index (==) :: TableIndex -> TableIndex -> Bool # (/=) :: TableIndex -> TableIndex -> Bool # | |
Ord TableIndex Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Index compare :: TableIndex -> TableIndex -> Ordering # (<) :: TableIndex -> TableIndex -> Bool # (<=) :: TableIndex -> TableIndex -> Bool # (>) :: TableIndex -> TableIndex -> Bool # (>=) :: TableIndex -> TableIndex -> Bool # max :: TableIndex -> TableIndex -> TableIndex # min :: TableIndex -> TableIndex -> TableIndex # | |
Show TableIndex Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Index showsPrec :: Int -> TableIndex -> ShowS # show :: TableIndex -> String # showList :: [TableIndex] -> ShowS # |
data IndexMethod Source #
Instances
Eq IndexMethod Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Index (==) :: IndexMethod -> IndexMethod -> Bool # (/=) :: IndexMethod -> IndexMethod -> Bool # | |
Ord IndexMethod Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Index compare :: IndexMethod -> IndexMethod -> Ordering # (<) :: IndexMethod -> IndexMethod -> Bool # (<=) :: IndexMethod -> IndexMethod -> Bool # (>) :: IndexMethod -> IndexMethod -> Bool # (>=) :: IndexMethod -> IndexMethod -> Bool # max :: IndexMethod -> IndexMethod -> IndexMethod # min :: IndexMethod -> IndexMethod -> IndexMethod # | |
Read IndexMethod Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Index readsPrec :: Int -> ReadS IndexMethod # readList :: ReadS [IndexMethod] # readPrec :: ReadPrec IndexMethod # readListPrec :: ReadPrec [IndexMethod] # | |
Show IndexMethod Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Index showsPrec :: Int -> IndexMethod -> ShowS # show :: IndexMethod -> String # showList :: [IndexMethod] -> ShowS # |
indexOnColumn :: RawSQL () -> TableIndex Source #
indexOnColumns :: [RawSQL ()] -> TableIndex Source #
indexOnColumnWithMethod :: RawSQL () -> IndexMethod -> TableIndex Source #
Create an index on the given column with the specified method. No checks are made that the method is appropriate for the type of the column.
indexOnColumnsWithMethod :: [RawSQL ()] -> IndexMethod -> TableIndex Source #
Create an index on the given columns with the specified method. No checks are made that the method is appropriate for the type of the column; cf. the PostgreSQL manual.
uniqueIndexOnColumn :: RawSQL () -> TableIndex Source #
uniqueIndexOnColumnWithCondition :: RawSQL () -> RawSQL () -> TableIndex Source #
uniqueIndexOnColumns :: [RawSQL ()] -> TableIndex Source #
sqlCreateIndexMaybeDowntime :: RawSQL () -> TableIndex -> RawSQL () Source #
Create an index. Warning: if the affected table is large, this will prevent
the table from being modified during the creation. If this is not acceptable,
use CreateIndexConcurrentlyMigration
. See
https://www.postgresql.org/docs/current/sql-createindex.html for more
information.
sqlCreateIndexConcurrently :: RawSQL () -> TableIndex -> RawSQL () Source #
Create index concurrently.
sqlDropIndexMaybeDowntime :: RawSQL () -> TableIndex -> RawSQL () Source #
Drop an index. Warning: if you don't want to lock out concurrent operations
on the index's table, use DropIndexConcurrentlyMigration
. See
https://www.postgresql.org/docs/current/sql-dropindex.html for more
information.
sqlDropIndexConcurrently :: RawSQL () -> TableIndex -> RawSQL () Source #