I am practicing firebase Real time Database but looking the query Structure I am planning to use the QueryBase https://github.com/davideast/Querybase
so I was just wandering how to deal with it?
I have a service called UserService
export class UsersService {
private dbPath = '/users';
usersRef: AngularFireList<User> = null;
constructor( private db: AngularFireDatabase) {
this.usersRef = db.list(this.dbPath);
}
getUserList(): AngularFireList<User> {
return this.db.list('/users', ref => ref.orderByChild('name').equalTo('kushal')
}
this works perfect filtering by name but I want to filter by multiple fields like name and email.
I know its possible by query base but I don't know how to use use it.
I saw the reference post on stack overflow and documentations but didn't able to make out what imports I need to do and how can I use it?
I know the working structure just need to get started like how can I create querybase ref like
const databaseRef = firebase.database().ref().child('people');
const querybaseRef = querybase.ref(databaseRef, ['name', 'age', 'location']);
this code is provided in the documentation I am able to make the first line but for getting querybase.ref what I need to do?
EDIT
After running npm command for query base what are the next steps I need to follow to import queryBase to angular project ?