Skip to main content
プラグインに戻る
@capgo/capacitor-firebase-firestore
チュートリアル
@capgo/capacitor-firebase-firestore

Firebase Firestore

Firebase Cloud Firestore 用の Capacitor プラグイン

ガイド

Firebase Firestore のチュートリアル

Firebase Firestore と @capgo/capacitor を使用する

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);

- 完全な参照

Capgoから続けて@capgo/capacitor-firebase-firestoreを使用

Capgoを使用している場合 Using @capgo/capacitor-firebase-firestore __CAPGO_KEEP_0__ プラグインディレクトリ Capgo Plugin Directory Capgo プラグインディレクトリの__CAPGO_KEEP_1__プラグイン Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, プラグインの追加または更新の実装詳細 Ionic Enterprise プラグインの代替 Ionic Enterprise プラグインの代替の製品ワークフロー Capgoから続けて@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-firebase-firestoreを使用 Capgo Native Builds Capgo Native Buildsの製品ワークフロー