Untitled
Anonymous
javascript
03/14/2023 12:17 PM
404 B
25
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...