概述
概述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.ts 在 capacitor-firebase.
继续从 @capgo/capacitor-firebase-firestore
Section titled “从@capgo/capacitor-firebase-firestore”继续”如果您正在使用 @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 原生构建。