| Copyright | © Koz Ross 2021 |
|---|---|
| License | MIT |
| Maintainer | koz.ross@retro-freedom.nz |
| Stability | Experimental |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Database.PostgreSQL.Entity.Internal.QQ
Description
Synopsis
- field :: QuasiQuoter
Documentation
field :: QuasiQuoter Source #
A quasi-quoter for safely constructing Fields.
Example:
instance Entity BlogPost where
tableName = "blogposts"
primaryKey = [field| blogpost_id |]
fields = [ [field| blogpost_id |]
, [field| author_id |]
, [field| uuid_list :: uuid[] |] -- ← This is where we specify an optional PostgreSQL type annotation
, [field| title |]
, [field| content |]
, [field| created_at |]
]Since: 0.1.0.0