ガイド
Firebase Firestoreのチュートリアル
@capgo/capacitor-firebase-firestoreの使用
CapacitorプラグインのFirebase Cloud Firestore
インストール
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/
Keep going from Using @capgo/capacitor-firebase-firestore
Capacitor Firebase Firestoreプラグインを使用している場合 Capacitorの@capgo/capacitor-firebase-firestoreを使用 Capacitorの@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-firebase-firestoreを使用して、ネイティブプラグインの作業計画を立て、CloudflareのCapacitorプラグインディレクトリと接続 Capgoプラグインディレクトリ Capgoプラグインディレクトリの製品ワークフロー Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, プラグインの追加または更新 プラグインの追加または更新 Ionic Enterpriseプラグインの代替 Ionic Enterpriseプラグインの代替 Capgo Native Builds for the product workflow in Capgo Native Builds.