Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Searchlogic 可以不区分大小写搜索吗?
根据searchlogic自述
您可以使用
User.username_like("bjohnson")
和喜欢的是case inesnsitive。
case inesnsitive
取决于您的数据库配置。例如,postgres 默认区分大小写,
不会找到比约翰逊。
sqlite 默认情况下不区分大小写,但是会找到 Bjohnson。
二进制逻辑的搜索逻辑的更高版本具有使用 ILIKE 执行不区分大小写搜索的 postgres 特定代码。
当区分大小写时,您创建的任何自定义命名范围当然都需要考虑您的数据库平台。