Firebase是否支持REST API中的批处理操作? [英] Does Firebase support batch operations in REST API?

查看:66
本文介绍了Firebase是否支持REST API中的批处理操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Firebase时,我需要批量 Delete POST 操作.
它是否在REST API中支持批处理操作?

I need batch DELETE, POST operations when using Firebase.
Does it support batch operations in REST API?

推荐答案

Firebase中最简单的批处理"操作是在树中上移一个级别,然后执行PATCH或DELETE操作.

The simplest "batch" operation in Firebase would be to move up one level in the tree and either do a PATCH or DELETE op.

请考虑以下数据结构:

/foo/bar
/foo/baz
/foo/bap
/foo/bam

如果要删除 bar baz ,我可以执行以下操作:

If I want to remove bar and baz, I could do the following:

curl -X PATCH https://<instance>.firebaseio.com/<PATH>.json -d '{"bar": null, "baz": null}'

这篇关于Firebase是否支持REST API中的批处理操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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