简体   繁体   English

使sails.js水线区分大小写

[英]make sails.js waterline case Sensitive

there is a way to configure waterline in sails to make query case sensitive ? 有没有办法在帆中配置水线以使查询区分大小写? In this moment i can do onlycase-insensitive search and these are too slow because index is not used 在这一刻,我只能执行不区分大小写的搜索,并且由于不使用索引,这些搜索太慢了

[updated ] i try to use the following solution [更新]我尝试使用以下解决方案

  mysqlAdapter: {
    adapter: 'sails-mysql',
    host: 'localhost',
    user: 'root',
    password: 'tecreply',
    database: 'sailsApi',
    wlNext: {
      caseSensitive: true
    }
  }

but if i try to use the metod Find on my model i see that is still not case sensitive... someone can help me ? 但是,如果我尝试在我的模型上使用metod Find,我仍然认为它不区分大小写...有人可以帮助我吗?

Please take a look at : https://github.com/balderdashy/waterline/issues/239#issuecomment-216342636 请看一下: https : //github.com/balderdashy/waterline/issues/239#issuecomment-216342636

Guys found solution for that. 伙计们找到了解决方案。 You have to configure it in your connection settings, eg: 您必须在连接设置中对其进行配置,例如:

postgresql: {
  url: 'postgres://username:password@hostname:port/database',
  wlNext: {
    caseSensitive: true
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM