跳过内容

@capgo/capacitor-firebase-firestore

Capacitor Firebase Cloud Firestore 插件

概述

概述

Capacitor Firebase Cloud Firestore 插件。

核心功能

核心功能
  • addDocument - 在指定的集合中添加一个新文档,包含给定的数据。
  • setDocument - 将数据写入指定的文档。如果文档尚未存在,则会创建它。
  • getDocument - 读取指定文档的内容。
  • updateDocument - 更新指定文档的字段。

公共API

公共API
方法描述
addDocument在指定的集合中添加一个新文档,包含给定的数据。
setDocument将数据写入指定的文档中。如果文档不存在,则会创建一个新的文档。
getDocument读取指定文档的内容。
updateDocument更新指定文档中的字段。
deleteDocument删除指定文档。
writeBatch将多个写操作合并为一个批次执行。
getCollection读取指定集合的文档。
getCollectionGroup读取指定集合组的文档。
getCountFromServer获取指定集合中的文档数量。
clearPersistence清除持久存储。这包括待写入的数据和缓存的文档。
enableNetwork重新启用网络访问。
disableNetwork禁用网络访问。
useEmulator为应用程序配置 Firestore 模拟器。
addDocumentSnapshotListener添加文档快照事件监听器。
addCollectionSnapshotListener添加集合快照事件监听器。
addCollectionGroupSnapshotListener添加集合组快照事件监听器。
removeSnapshotListener移除文档或集合快照事件监听器。
removeAllListeners移除此插件的所有监听器。
getPluginVersion获取此插件的版本。

真实数据来源

真实数据来源

此参考资料是从 src/definitions.tscapacitor-firebase.

如果您正在使用 @capgo/capacitor-firebase-firestore 与其连接 Capgo 插件目录 Capgo 插件目录中的产品工作流程 Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, __CAPGO_KEEP_0__ 插件 __CAPGO_KEEP_1__ 添加或更新插件 添加或更新插件的实现细节, Capgo 原生构建 为产品工作流程在 Capgo 原生构建。