加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

Firebase密钥是否对整个数据库都是唯一的?

发布时间:2020-12-12 08:53:10 所属栏目:MsSql教程 来源:网络整理
导读:使用push()时,Firebase会创建一个唯一的ID或密钥,例如-KKm9iRSax-scGn7m3Lb. 根据文件: The push() method generates a unique ID every time a new child is added to the specified Firebase reference. 和: The unique ID generated by push() is based
使用push()时,Firebase会创建一个唯一的ID或密钥,例如-KKm9iRSax-scGn7m3Lb.

根据文件:

The push() method generates a unique ID every time a new child is
added to the specified Firebase reference.

和:

The unique ID generated by push() is based on a timestamp,so list
items are automatically ordered chronologically.

此ID或密钥对整个数据库是唯一的还是仅对引用(如/ users)?

解决方法

Firebase密钥是部分时间戳和部分随机字符.因此,尽管它们在整个数据库中应该是唯一的,但两个密钥最终可能会相同.

Firebase blog: The 2^120 Ways to Ensure Unique Identifiers

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读