loopbackio / loopback-connector-oracle

Connect Loopback to Oracle
http://loopback.io/doc/en/lb3/Oracle-connector.html
Other
28 stars 30 forks source link

How can make a request insensitive #162

Closed gabe2code closed 6 years ago

gabe2code commented 6 years ago

How can make a request insensitve

I try doing a regex but still recieve the same results. an example: let pattern = new RegExp(name, "gi"); User.find({where: { or: [ {name: {like: pattern}} ], }}).then(users =>{ console.log(users) }) that code always return an empty array

I try too with let pattern = new RegExp('*/'+name+ '*/', "gi"); still the same result...

thanks in advance

raymondfeng commented 6 years ago

Can you try to use regexp as the operator instead of like?

gabe2code commented 6 years ago

Thanks for the quick response @raymondfeng , I try to... but still gat nothing

raymondfeng commented 6 years ago

See https://github.com/strongloop/loopback-connector-oracle/blob/master/test/oracle.regexp.test.js#L28

gabe2code commented 6 years ago

Thanks... @raymondfeng now it's working... I was test with regexp but with symbol $ after...

dhmlau commented 6 years ago

Closing as resolved.

abhayverma commented 4 years ago

The filter is not working, it just returns everything as if no filter is applied.