概述
概述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 Capacitor 插件中的Capgo实现细节 添加或更新插件 添加或更新插件中的实现细节 Ionic 企业插件替代品 Ionic 企业插件替代品中的产品工作流程 Capgo Native Builds for the product workflow in Capgo Native Builds.