Database field name to apply the enum filter to
Single value or array of values to match
Prisma where clause object with 'in' condition
// Single language filter
const langFilter = buildEnumFilter('sourceLanguage', 'en');
// Returns: { sourceLanguage: { in: ['en'] } }
Builds Prisma enum filter for matching against specific values.
This utility creates a Prisma where clause for filtering by specific enum values or a list of allowed values. It handles both single values and arrays of values, using Prisma's 'in' operator for multiple values.