How to rename nodes in Firebase from Unity

做~自己de王妃 提交于 2020-01-19 18:03:25

问题


I am using Firebase-Unity beta tool for real time data in my app. I want to change node names in the tree without override its children. For example:

    IFirebase firebase;
    firebase = Firebase.CreateNew ("https://test1.firebaseio.com/someChild");
    firebase_Rank.Child("ChilOne").SetValue(1);
    firebase_Rank.Child("ChilTwo").SetValue(2);
    firebase_Rank.Child("ChilThree").SetValue(3);

In this kind of tree is it possible to change the names of "ChildOne" without override it's value.


回答1:


The Firebase Database has no way to rename an existing node.

Most developers accomplish a rename by inserting a copy of the node with the new name and then deleting the old node.



来源:https://stackoverflow.com/questions/38261811/how-to-rename-nodes-in-firebase-from-unity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!