valderman / selda

A type-safe, high-level SQL library for Haskell
https://selda.link
MIT License
478 stars 58 forks source link

How to restrict by UUID? #174

Closed decapo01 closed 2 years ago

decapo01 commented 2 years ago

I'm attempting to use UUIDs as primary keys and I'm unable to use them as restriction conditions.

image

the exact error is this image Is there a way to construct the column with a UUID?

decapo01 commented 2 years ago

I figured it out. I needed to use literal. Also, I don't want the db to keep track of the id so I changed personId :: ID UUID to personId :: UUID My code now looks like this for anyone else that comes across this image