Change default name/email search query to case insensitive regex instead of LIKE

This commit is contained in:
Kailash Nadh 2018-12-19 00:12:40 +05:30
parent f686606b9e
commit b461f51275

View file

@ -553,7 +553,7 @@ class Subscribers extends React.PureComponent {
}
q = q.replace(/'/g, "''")
const query = `(name LIKE '%${q}%' OR email LIKE '%${q}%')`
const query = `(name ~* '${q}' OR email ~* '${q}')`
this.fetchRecords({ query: query })
}