Untitled
unknown
javascript
2 years ago
301 B
9
Indexable
const whereClause = $filters$ .map(({ key, value }) => { let operator = 'LIKE'; let useValue = `%${value}%`; if (typeof(value) === 'string') useValue = `'${useValue}'`; const result = `${key} ${operator} ${useValue}`; return result; }) .join(' AND '); whereClause;
Editor is loading...