Compare enums in select
I want to compare enum from my
offer
schema with query parameter (that is basically string).
export const offerType = pgEnum('type', ['SEARCH']);
query used in where
statement: eq(offers.type, query.type)
error from nestjs server:
How am I supposed to check equality of enum and string in my select query?1 Reply
can you show the code that you’re running?
and the types for query?