I'd break this out to multiple lines - it's kind of long.
```coffee
base_query += " AND ("
base_query += ("#{key} LIKE '%' || $where || '%'" for key in ["workload", "data", "warnings", "handle", "function"]).join " OR "
base_query += ")"
```