I have a Firestore database which contains a list of documents in a collection. Each document has a scheduled date which is a "timestamp" data type. I'm able to get data by the scheduled date, but not able to get all documents not equal to a particular scheduled date. So what I have done is filtered all data with not equal to the scheduled date in frontend but there is a tradeoff I have to store all collection documents in front-end
Below query for getting data by a scheduled date.
where: [
[
'ScheduleDateTime',
'>=',
new Date('2020-02-12 00:00:00'),
],
[
'ScheduleDateTime',
'<=',
new Date('2020-02-12 23:59:59'),
],
],
Logic I built-in front-end side for not equal date.
const Quotations =
allDocuments.filter(
ele =>
scheduledDateList.indexOf(
ele.id
) == -1
);
We already know that we cant use !=
or OR
condition in firestore. It's very difficult to work on firestore. Any suggestions or solutions will be helpful.