firebase - Firebase .index关于它是如何工作的?
问题描述
例如,如果我有:
users: {
userId1: {
email: "email1"
},
userId2: {
email: "email2"
}
}
如果我想弄清楚我想添加到我的用户树中的某个新电子邮件是否存在。我希望复杂性与用户树中的数据量成线性关系。像 O(n)?
如果我有规则:
"users": {
".indexOn": ["email"]
}
Firebase 到底在做什么?它会变成像 O(1) 这样的东西吗?
解决方案
推荐阅读
- reactjs - React - 在本地状态下更新 2d 数组而不更新显示网格中的每个组件
- python - 使用 for 循环将键和值添加到空字典
- reactjs - Django rest auth 安全地存储令牌
- powershell - 使用 Powershell 通过分隔符拆分 Excel 工作簿的一列
- django - 尝试将 Django 时间字段设置为 00:00:00 但不希望它在显示时显示午夜
- command - 如何使用特定命令删除频道?
- postgresql - 拒绝用户更改自己的角色
- python - SQLAlchemy order_by 基于第一个数字而不是整数返回数字
- javascript - 在Vue 3中单击路由器链接时如何在不重新加载页面的情况下切换侧边栏
- python-3.x - 与 Python 3.9.1、opencv.python 4.5.1.48 和掩码匹配的模板(透明度)