Linked Questions

Popular Questions

angularfire5 & firebase autocomplete equivelent to WHERE LIKE?

Asked by At

My autocomplete services for firebase using angularfire2 v5 look like this:

getUsersTypeAhead(searchString: string) {
    const list: AngularFireList<User> = this.fireBase.list('/users', ref => ref
        .orderByChild('name')
        .limitToFirst(10)
        .startAt(searchString)
        .endAt(searchString + '\uf8ff')
    );
    return list.snapshotChanges().pipe(
        map(items => items.map(item => ({
            key: item.key,
            name: item.payload.val().name
        })))
    );
}

However this appears to be case sensitive. Is this a limitation or is there a query that would be similar to WHERE LIKE in mySQL?

Related Questions