Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

How to use Escape command in Like Operator.. I am not able find results of '%' and '_' in react native

$
0
0
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

  1. % : for multiple character
  2. _ : 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.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>