Pet*_*ter 5 firebase firebase-security firebase-realtime-database
我正在使用新的螺栓编译器(在此处介绍:https://www.firebase.com/blog/2015-11-09-introducing-the-bolt-compiler.html)
我需要在我的类型Event的owner字段中定义一个索引:
type Event {
description : String | Null,
name : String,
color : Number,
owner : String,
shared : Boolean
index() = "owner";
}
Run Code Online (Sandbox Code Playgroud)
当我尝试编译此代码时,我得到以下输出:
bolt: Generating rules.json...
bolt:1:1: Unsupported method name in type statement: 'index' (allowed: 'validate', 'read', 'write')
Run Code Online (Sandbox Code Playgroud)
请帮忙:我该如何定义索引?我想我需要在路径声明中定义它们?
bolt编译器的文档在定义索引时并不多:https://github.com/firebase/bolt/blob/master/docs/language.md
| 归档时间: |
|
| 查看次数: |
665 次 |
| 最近记录: |