1

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

Merndev
  • 179
  • 1
  • 3
  • 10
  • Does this answer your question? [Firebase Database in SQL](https://stackoverflow.com/questions/42222347/firebase-database-in-sql) – michaeldel Apr 30 '20 at 03:35
  • See Doug's answer. Additionally, you may get a more specific answer if you can update your question with the query you're trying to do. Include a description of the query, what your Firebase structure looks like and what the desired outcome is. – Jay Apr 30 '20 at 16:17

1 Answers1

2

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:

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441