Firebase Database - How to perform a prefix wildcard query

Viewed 3954

I would like to perform wildcard queries on a Firebase database, and do not know whether the libraries support this. - (my guess it does not.)

I want an optimal solution where the network traffic will be as little as possible, assume the dataset is millions of records.

Dataset (using prefix wildcard):

user_id:
         id_001123:      
                   name: "java"
         id_002124:
                   name: "objective-c"
         id_003125:
                   name: "swift"

How would the code look like to retrieve the record id_002124 name field using a wildcard, you only have a portion of the id. eg. "%124".

The expected result would be id_002124, and the name being "objective-c"

Any mobile language example code would great. (Objective-C/Swift/Java)

1 Answers
Related