I need to delete all nodes with particular user key in any levels deeper while user profile deletion in Firebase. So I wonder is it possible to do that by some elegant way? Thanks.
Asked
Active
Viewed 16 times
0
-
What is your database structure? What code have you already tried to do this (even if it may not be elegant, as you say)? – Doug Stevenson Jan 20 '18 at 17:03
-
There is no way to pass query conditions into the Firebase Database and have it delete those items. You'll need to run the query to retrieve the keys/paths of the matching items and then delete those. If the solutions in the question I linked don't work for you, update your question with what you've tried so we can have a look. – Frank van Puffelen Jan 20 '18 at 17:06
-
@DougStevenson In DB I have many nodes with user key in various levels, so I need go over all DB to find that keys – Konstantin Konopko Jan 20 '18 at 17:08