squeal icon indicating copy to clipboard operation
squeal copied to clipboard

`enum` function in `Squeal.PostgreSQL.Expression`?

Open vrom911 opened this issue 5 years ago • 1 comments

There are a lot of functions like:

text :: TypeExpression schema (nullity PGtext)

for each of the PGType in Squeal.PostgreSQL.Expression module.

But, apparently, I don't see the way to use it with PGenum. Could you please tell me how I can use PGenum in this case, as I can't even set up the Schema?

vrom911 avatar Mar 22 '19 09:03 vrom911

Take a look at #80. The type expression for enums (or composites or any other user defined types) is

typedef :: Has alias schema (Typedef ty) => Alias alias -> TypeExpression schema (nullity ty)

echatav avatar Mar 22 '19 13:03 echatav