使用 Firebase CLI 选择文档

问题描述 投票:0回答:1

将 firebase CLI 与实时数据库结合使用时 我可以使用这样的命令来读取集合:

 % firebase database:get DB_Path

但是我找不到只选择我需要的文档的方法。

我很难相信这是不可能的。

类似:

 % firebase database:get DB_Path where (name='Biden Joe')

有正确的语法来做到这一点吗?

firebase firebase-realtime-database firebase-tools
1个回答
0
投票

要了解

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
© www.soinside.com 2019 - 2024. All rights reserved.