HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulepg-entity-0.0.6.0Haskell2010

Database.PostgreSQL.Entity.Internal.QQ

A quasi-quoter for Fields, supporting optional types.

There is little reason to import this module directly; instead, import Database.PostgreSQL.Entity, which re-exports the field quasiquoter.

Synopsis

A quasi-quoter for safely constructing Fields.

Example:

instance Entity BlogPost where
  tableName  = "blogposts"
  primaryKey = [field| blog_post_id |]
  fields = [ [field| blog_post_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 |]
           ]