简体   繁体   中英

Efficient way to query sql like in firebase

What's the updated and effient way to query sql like in firebase? I've search in forums and they say I should query all the documents then just do a javascript match function

Neither database provided by Firebase (Realtime Database and Firestore) have support for LIKE queries. This is not going to change any time soon, as these types of queries do not scale with the sort of indexes provided by these database.

You can do string prefix queries, which is similar to "WHERE field LIKE foo%", but that's all you get.

For Realtime Database, see:

For Firestore, see:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM