-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLite like operator doesn't work with special symbols #399
Comments
This by design, by default string.Contains() escapes special symbols, use Sql.Like() extension, it should not escape |
There is a little problem. I'm using layered approach in my app, so UI layer knows nothing about others... |
Is there some flag to turn off escaping? Or could you give me some advice on how to resolve this problem? |
@dvladimirovich heh... really have no other idea :( |
You could rewrite your Expression Tree befor handing over to linq2db. And replace every contains with Sql.like |
Oh, I see...I suspected that I would have to do just that. And I did not want to do this, but I had to... |
i think with expressionvisitor it should not be a big task, see https://stackoverflow.com/questions/17728188/rewrite-expression-to-replace-list-contains-with-custom-method |
Yeah, I've already had such experience in rewriting Expression trees using expression visitor=) |
I have an app which works with SQLite as data store. There is an issue when I'm using context search. If I use simple phrases BLToolkit converts it in
LIKE '%<search string>%'
and everything works fine. But I want to use special characters as_
to have an ability do search if I've forgotten what char must be here (e.g. when name is written in different languages). And when I print string like:_ванов
in my search field BLToolkit generates next query:LastQuery.txt
And it uses
ESCAPE~
for_
symbol. As a result it can't find anything...How could I resolve this problem?
The text was updated successfully, but these errors were encountered: