ガイド
Firebase Firestore についてのチュートリアル
@capgo/capacitor-firebase-firestore を使用する
Firebase Cloud Firestore 用の Capacitor プラグイン
インストール
bun add @capgo/capacitor-firebase-firestore
bunx cap sync
このプラグインが公開するもの
addDocument- 指定されたデータでコレクションに新しいドキュメントを追加します。setDocument- 指定された参照で参照されるドキュメントに書き込む。ドキュメントがまだ存在しない場合は作成されます。getDocument- 指定された参照で参照されるドキュメントを読み取ります。updateDocument- 指定された参照で参照されるドキュメントのフィールドを更新します。
例の使用方法
addDocument
指定されたデータでコレクションに新しいドキュメントを追加します。
import { FirebaseFirestore } from '@capgo/capacitor-firebase-firestore';
await FirebaseFirestore.addDocument({} as AddDocumentOptions);
setDocument
指定された参照で参照されるドキュメントに書き込む。ドキュメントがまだ存在しない場合は作成されます。
import { FirebaseFirestore } from '@capgo/capacitor-firebase-firestore';
await FirebaseFirestore.setDocument({} as SetDocumentOptions);
getDocument
指定された参照で参照されるドキュメントを読み取ります。
import { FirebaseFirestore } from '@capgo/capacitor-firebase-firestore';
await FirebaseFirestore.getDocument({} as GetDocumentOptions);
updateDocument
指定された参照で参照されるドキュメントのフィールドを更新します。
import { FirebaseFirestore } from '@capgo/capacitor-firebase-firestore';
await FirebaseFirestore.updateDocument({} as UpdateDocumentOptions);
フル リファレンス
- GitHub: https://github.com/Cap-go/capacitor-firebase/tree/main/packages/firestore
- ドキュメント: /docs/plugins/firebase-firestore/
Using @capgo/capacitor-firebase-firestore
使用中の場合は Using @capgo/capacitor-firebase-firestore native プラグインの作業を計画する場合、 Capgo プラグイン ディレクトリ Capgo プラグイン ディレクトリの製品ワークフロー Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, プラグインの実装詳細 プラグインの追加または更新 Ionic Enterprise プラグインの代替 Ionic Enterprise プラグイン代替の製品ワークフローについて、 Capgoネイティブビルド for the product workflow in Capgo Native Builds.