开发者

NHibernate and SQLite: will an IgnoreCase() query be an indexed lookup or not?

开发者 https://www.devze.com 2023-01-12 00:50 出处:网络
The Foo column is defined as \"Foo TEXT 开发者_JS百科unique\". Will an Eq().IgnoreCase() query use the index or will it perform a complete column scan?

The Foo column is defined as "Foo TEXT 开发者_JS百科unique". Will an Eq().IgnoreCase() query use the index or will it perform a complete column scan?

The query:

string foo = "foo";
IList<T> list = session.CreateCriteria(typeof(T)).
    Add(Expression.Eq("Foo", foo).IgnoreCase()).List<T>();


No. What IgnoreCase does is convert the property and parameter to lower case.

0

精彩评论

暂无评论...
验证码 换一张
取 消