I am currently utilizing Firebase real time database in the following way:
createSoldLead(soldLead: SoldLeadModel): void {
const soldLeadsReference = this.angularFireDatabase.list<SoldLeadModel>(
`groups/${this.groupId}/soldLeads`
);
const leadsReference = this.angularFireDatabase
.list<SoldLeadModel>(
`groups/${this.groupId}/leads`
);
soldLeadsReference.set(soldLead.id.toString(),soldLead);
leadsReference.remove(soldLead.id.toString());
}
The current implementation is functioning correctly. However, I am interested in performing a batch create/remove operation. Is there a way to ensure that both operations succeed simultaneously?
I came across this blog post, but I am unsure how to apply it to my specific scenario. Can anyone provide guidance on how to implement this in my case?