I am unable to get the case insensitive search from the database using Sails.js V1.0 + Waterline ORM. I am using sails-postgresql adapter. The running environment is Heroku + Heroku PostgreSQL.
Is there any way to turn off the following setting in database adapter - For performance reasons, case-sensitivity of contains depends on the database adapter.
Tried the method:
Datastore configuration is:
default: {
adapter: 'sails-postgresql',
url: 'postgres://....',
ssl: true,
wlNext: {
caseSensitive: true
}
}
The code block is:
var meetings = await Meeting.find({
select: ['id', 'uid', 'name', 'deleted', 'complete'],
where: {
owner: user.id,
name: { contains: searchJson.name } : ""
},
skip: (inputs.page > 0) ? (inputs.page) : 0,
limit: (inputs.limit > 0) ? (inputs.limit) : 10,
sort: 'date DESC'
});