Untitled
unknown
javascript
3 years ago
301 B
11
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...