if (search) where.title = Like(`%${search}%`);
In this line 'search' is the content user wants to search. the results are returned using Like Operator.
there are 2 methods to use LIKE
- % : for multiple character
- _ : for single character
but when we try to search the file name containing either '%' or '_', the search functionality is not working. it will show all the files
example: File_Name or File Name%
IN order to overcome this issue, there is a method called Escape, but I am not getting how to use it in React native (syntax). I tried the below code,
if (search) where.title = Like(`%${search}=%%`), escape('=');
but it is not working as expected.