メインコンテンツにスキップ
プラグインに戻る
@capgo/capacitor-firebase-firestore
チュートリアル
@capgo/capacitor-firebase-firestore

Firebase Firestore

Capacitor Firebase Cloud Firestore プラグイン

ガイド

Firebase Cloud Firestore についてのチュートリアル

@capgo/capacitor-firebase-firestore を使用

Capacitor plugin for Firebase Cloud Firestore.

__CAPGO_KEEP_0__ をインストール

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/capacitor-firebase-firestoreを使用している場合

@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-firebase-firestoreを使用している場合 Using @capgo/capacitor-firebase-firestore Cloudflare Plugin Directoryの製品ワークフロー Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, __CAPGO_KEEP_0__は保留中です。__CAPGO_KEEP_1__は保留中です。 __CAPGO_KEEP_0__は保留中です。__CAPGO_KEEP_1__は保留中です。 Ionic Enterprise Plugin Alternatives Ionic Enterprise プラグインの代替品のワークフローについて、 Capgo Native Builds Capgoネイティブビルドのワークフローについて。