How to remove a Node from the database using Firebase Realtime Database for Unity

Asked

Viewed 125 times

1

I use synchronized lists with Firebase Realtime Database for Unity and I need to improve them. I need to find a way to delete a single Item from the list without having to:

  1. Download the whole List.
  2. Remove the Item locally.
  3. Send the entire List back to the database.

I tried using Databasereference.Removevalueasync(), but this method only changes the value of Node/Node(Node) to null. I use Json Utility to translate from Json to my Custom Classes, the problem is that when you come across the value null My code simply creates a Standard Custom Class. This causes every time I delete an item, it still appears in the list. Only without the data.

I could simply, upon encountering the null, do not add it to Local List. But, this Item still exists on the server and doing so would make the Local List and the Server List uneven.

I could check if the item is without data and come to the conclusion that it is deleted. But this seems a bit messy.

Does anyone know any way to delete a Node/Node(Node) instead of changing its value to null?

Remembering that I use Firebase Realtime Database for Unity.

  • Please place the content in English.

  • I wanted to post on the global stack, have you move to it?

  • Sorry, but I don’t have this power, will have to copy and paste even :P

  • I’ll also have to wait an hour and a half. -_- The mistake was mine anyway. I’ll translate the question, who knows the people here help me too.

  • As soon as you translate, send one more message here in the comments, so I’ll start a vote to reopen the question.

  • Translated... :)

  • Unfortunately, Firebase still has no way: 1. Remove an item without downloading the entire list; 2. Remove an item from the server and keep the item local.

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.