要了解的选项
database:get
命令,运行
firebase database:get --help
如:
% firebase database:get --help
Usage: firebase database:get [options] <path>
fetch and print JSON data at the specified path
Options:
-o, --output <filename> save output to the specified file
--pretty pretty print response
--shallow return shallow response
--export include priorities in the output response
--order-by <key> select a child key by which to order results
--order-by-key order by key name
--order-by-value order by primitive value
--limit-to-first <num> limit to the first <num> results
--limit-to-last <num> limit to the last <num> results
--start-at <val> start results at <val> (based on specified ordering)
--end-at <val> end results at <val> (based on specified ordering)
--equal-to <val> restrict results to <val> (based on specified ordering)
--instance <instance> use the database <instance>.firebaseio.com (if omitted, use default database instance)
-h, --help output usage information
因此,您可以通过以下方式获取您名称的所有子节点:
firebase database:get /users --order-by "name" --equal-to "Michael"
别忘了
define an index
在你的规则中代表“名字”。