Safe Haskell | None |
---|---|
Language | Haskell2010 |
Database.PostgreSQL.PQTypes.Model.PrimaryKey
Synopsis
- data PrimaryKey
- pkOnColumn :: RawSQL () -> Maybe PrimaryKey
- pkOnColumns :: [RawSQL ()] -> Maybe PrimaryKey
- pkName :: RawSQL () -> RawSQL ()
- sqlAddPK :: RawSQL () -> PrimaryKey -> RawSQL ()
- sqlAddPKUsing :: RawSQL () -> TableIndex -> RawSQL ()
- sqlDropPK :: RawSQL () -> RawSQL ()
Documentation
data PrimaryKey Source #
Instances
Eq PrimaryKey Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.PrimaryKey | |
Show PrimaryKey Source # | |
Defined in Database.PostgreSQL.PQTypes.Model.PrimaryKey Methods showsPrec :: Int -> PrimaryKey -> ShowS # show :: PrimaryKey -> String # showList :: [PrimaryKey] -> ShowS # |
pkOnColumn :: RawSQL () -> Maybe PrimaryKey Source #
pkOnColumns :: [RawSQL ()] -> Maybe PrimaryKey Source #
sqlAddPKUsing :: RawSQL () -> TableIndex -> RawSQL () Source #
Convert a unique index into a primary key. Main usage is to build a unique index concurrently first (so that its creation doesn't conflict with table updates on the modified table) and then convert it into a primary key using this function.