We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#11727 Issue Description LIKE query where column contains + returns 0 results
+
With the below LIKE query on customer column email where email contains +
customer
email
const Op = Sequelize.Op let data: any[] await Customer.findAll({ where: { [Op.and]: [ lastName: 'test', email: { [Op.iLike]: '%some+email+test@gmail.com%' } ] } }).then((results: any) => { if (results.length > 0) { data = results } })
Should result in 1 or more in data array
data
[ { lastName: 'test', email: 'some+email+test@gmail.com' } ]
data is empty
[]
If I set the email query to [Op.iLike]: '%some%', then I get results.
[Op.iLike]: '%some%'
The text was updated successfully, but these errors were encountered:
Yes, you want to escpace + as it is valid pattern matching operator https://www.postgresql.org/docs/9.6/functions-matching.html
Sorry, something went wrong.
No branches or pull requests
#11727 Issue Description
LIKE query where column contains
+
returns 0 resultsWhat are you doing?
With the below LIKE query on
customer
columnemail
where email contains+
What do you expect to happen?
Should result in 1 or more in
data
arrayWhat is actually happening?
data is empty
If I set the
email
query to[Op.iLike]: '%some%'
, then I get results.Additional context
Environment
Issue Template Checklist
How does this problem relate to dialects?
Would you be willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: