Closed danielindiano closed 5 years ago
Because we can’t query on multiple fields we should structure our json tree as /reports/:site
Queries can only order by one key at a time
source: https://firebase.google.com/docs/database/admin/retrieve-data
It should allow to call site on URL and filter results by start_date and end_date
if (this.site) {
query.orderByChild = 'date';
query.startAt = "2017-03-02";
query.endAt = "2017-03-04";
}
this.reports = db.list('/reports/' + this.site.title, {query: query});
Define wich data structure we'll use to store the reports on firebase.
We can use:
Simple data on /reports
Insert a new level for date /reports/
Insert a new level for provider /reports/
Another suggestion?