Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data TableIndex = TableIndex {
- idxColumns :: [IndexColumn]
- idxInclude :: [RawSQL ()]
- idxMethod :: IndexMethod
- idxUnique :: Bool
- idxValid :: Bool
- idxWhere :: Maybe (RawSQL ())
- data IndexColumn = IndexColumn (RawSQL ()) (Maybe (RawSQL ()))
- indexColumn :: RawSQL () -> IndexColumn
- indexColumnWithOperatorClass :: RawSQL () -> RawSQL () -> IndexColumn
- data IndexMethod
- tblIndex :: TableIndex
- indexOnColumn :: IndexColumn -> TableIndex
- indexOnColumns :: [IndexColumn] -> TableIndex
- indexOnColumnWithMethod :: IndexColumn -> IndexMethod -> TableIndex
- indexOnColumnsWithMethod :: [IndexColumn] -> IndexMethod -> TableIndex
- uniqueIndexOnColumn :: IndexColumn -> TableIndex
- uniqueIndexOnColumnWithCondition :: IndexColumn -> RawSQL () -> TableIndex
- uniqueIndexOnColumns :: [IndexColumn] -> 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
Show TableIndex Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Index showsPrec :: Int -> TableIndex -> ShowS # show :: TableIndex -> String # showList :: [TableIndex] -> ShowS # | |
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 # |
data IndexColumn Source #
IndexColumn (RawSQL ()) (Maybe (RawSQL ())) |
Instances
IsString IndexColumn Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Index fromString :: String -> IndexColumn # | |
Show IndexColumn Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Index showsPrec :: Int -> IndexColumn -> ShowS # show :: IndexColumn -> String # showList :: [IndexColumn] -> ShowS # | |
Eq IndexColumn Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Index (==) :: IndexColumn -> IndexColumn -> Bool # (/=) :: IndexColumn -> IndexColumn -> Bool # | |
Ord IndexColumn Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.Index compare :: IndexColumn -> IndexColumn -> Ordering # (<) :: IndexColumn -> IndexColumn -> Bool # (<=) :: IndexColumn -> IndexColumn -> Bool # (>) :: IndexColumn -> IndexColumn -> Bool # (>=) :: IndexColumn -> IndexColumn -> Bool # max :: IndexColumn -> IndexColumn -> IndexColumn # min :: IndexColumn -> IndexColumn -> IndexColumn # |
indexColumn :: RawSQL () -> IndexColumn Source #
indexColumnWithOperatorClass :: RawSQL () -> RawSQL () -> IndexColumn Source #
data IndexMethod Source #
Instances
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 # | |
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 # |
indexOnColumns :: [IndexColumn] -> TableIndex Source #
indexOnColumnWithMethod :: IndexColumn -> 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 :: [IndexColumn] -> 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.
uniqueIndexOnColumnWithCondition :: IndexColumn -> RawSQL () -> TableIndex Source #
uniqueIndexOnColumns :: [IndexColumn] -> 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 #