Firebase设置数据结构 [英] Firebase set data structure

查看:129
本文介绍了Firebase设置数据结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我想知道在使用Firebase控制台时是否有办法强制数据库结构。

例如,我需要添加一个名为Sample的对象,值为3,那么当我想添加另一个对象时,我只能插入对象结构(名称和价值)。有没有办法实现这一点?

解决方案

使用Firebase控制台输入数据时,无法强制执行某些数据结构。

通过Firebase控制台(console.firebase.google.com)访问Firebase数据库时,您正在以管理帐户访问数据库。这样的管理访问绕过了安全规则:所有的读写操作都是允许的,数据不被验证。


Hi I'd like to know if there's a way to force the DB structure when using Firebase Console.

For example I need to add an object with name: "Sample" and value: 3, then when I want to add another object i can only insert object with the same structure (name and value). Is there any way to achieve this?

解决方案

There is no way to enforce a certain data structure when entering data using the Firebase Console.

When you access the Firebase Database through the Firebase Console (console.firebase.google.com), you are accessing the database as an administrative account. Such administrative access bypasses the security rules: all reads and writes are allowed and data is not validated.

这篇关于Firebase设置数据结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆