Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simulate a Delete with Firebase

Tags:

firebase

In the "Simulator" built into the Firebase site is it possible to simulate deleting a node?

I tried entering the path to a node in the URL field (e.g. /my/path/-JCNAUFZJFJMGX1RYWJL) and I entered {} into the data field but I think this just simulates adding nothing as apposed to deleting.

like image 247
rob Avatar asked Jan 17 '14 20:01

rob


1 Answers

In Firebase, writing a null value is equivalent to removing the data at a given reference (i.e. ref.set(null) is effectively the same as ref.remove()), and thus using a null value is an effective way to test removing data in the simulator.

like image 178
Rob DiMarco Avatar answered Sep 30 '22 17:09

Rob DiMarco