【发布时间】:2016-03-16 16:32:50
【问题描述】:
我正在使用新的 Bolt 编译器(此处介绍: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";
}
当我尝试编译这段代码时,我得到以下输出:
bolt: Generating rules.json...
bolt:1:1: Unsupported method name in type statement: 'index' (allowed: 'validate', 'read', 'write')
请帮助:我应该如何定义索引?我想我需要在路径语句中定义它们?
bolt 编译器的文档还没有包含太多关于定义索引的内容:https://github.com/firebase/bolt/blob/master/docs/language.md
【问题讨论】:
标签: firebase firebase-security firebase-realtime-database