I am using firebase for data storage. The data structure
is like
this:
products:{
product1:{
name:"chocolate",
}
product2:{
name:"chochocho",
}
}
I
want to perform an auto complete operation for this data, and normally i write the query
like this:
"select name from
PRODUCTS where productname LIKE '%" + keyword +
"%'";
So, for my
situation, for example, if user types "cho", i need to bring both "chocolate" and
"chochocho" as result. I thought about bringing all data under "products" block, and
then do the query at the client, but this may need a lot of memory for a big database.
So, how can i perform sql LIKE
operation?
Thanks
No comments:
Post a Comment