@@ -159,7 +159,17 @@ Composite types can be generated from a Haskell record type, for example:
159>>> data Complex = Complex {real :: Maybe Double, imaginary :: Maybe Double} deriving GHC.Generic
159>>> data Complex = Complex {real :: Maybe Double, imaginary :: Maybe Double} deriving GHC.Generic
160>>> instance SOP.Generic Complex
160>>> instance SOP.Generic Complex
161>>> instance SOP.HasDatatypeInfo Complex
161>>> instance SOP.HasDatatypeInfo Complex
163+>>> :kind! CompositeFrom Complex
164+CompositeFrom Complex :: PGType
165+= 'PGcomposite '['("real", 'PGfloat8), '("imaginary", 'PGfloat8)]
169+ definition :: Definition '[] '["complex" ::: 'Typedef (CompositeFrom Complex)]
162−>>> printSQL $ createTypeCompositeFrom @Complex #complex
170+ definition = createTypeCompositeFrom @Complex #complex
171+in printSQL definition
163CREATE TYPE "complex" AS ("real" float8, "imaginary" float8);
173CREATE TYPE "complex" AS ("real" float8, "imaginary" float8);