rob
rob

Reputation: 18513

Simulate a Delete with 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.

Upvotes: 5

Views: 455

Answers (1)

Rob DiMarco
Rob DiMarco

Reputation: 13266

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.

Upvotes: 7

Related Questions