命名空间:数据库
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
方法
示例数据快照
静止的
exampleDataSnapshot() 返回 test.database.DataSnapshot
获取已填充数据的示例数据快照。可以传递到包装数据库的onCreate
或onDelete
函数中。
- 退货
non-null test.database.DataSnapshot
示例数据快照更改
静止的
exampleDataSnapshotChange() 返回 test.database.DataSnapshot
获取已填充数据的数据快照的示例Change
对象。可以传递到包装的数据库onUpdate
或onWrite
函数中。
- 退货
non-null test.database.DataSnapshot
制作数据快照
静止的
makeDataSnapshot(val, refPath, app) 返回 test.database.DataSnapshot
创建数据快照以进行测试。
范围 |
---|
瓦尔 | (字符串、数字、布尔值或非空对象) 快照的数据值。 |
参考路径 | 细绳 参考的完整路径(例如“users/alovelace”)。 |
应用程序 | firebase.app.App 数据库所属的 Firebase 应用。初始化应用程序时提供的databaseURL 用于创建此快照。如果您在初始化firebase-functions-test 时提供了配置值,则无需提供此参数。 值可能为空。 |
- 退货
non-null test.database.DataSnapshot
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-01。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]