Assume that I have a relational table consisting of 6 fields and I have exposed a API with PATCH verb which would update this table based on the parameters provided via REST API. What method/approach would I use to have a generic method which takes the parameters for the where clause dynamically without exposing a different repository method for each field.
For example: Assume there is a employee table with fields id, first name, last name, phone number, date of joining and location. Assume I have a PATCH URI which takes id as the parameter and it can alter first name or last name or phone number or date of joining or location or combination of any of these fields. How will I write repository method in a generic way for above possible combinations of fields.