본문으로 이동
플러그인으로 돌아가기
@capgo/capacitor-firebase-firestore
튜토리얼
@capgo/capacitor-firebase-firestore

파이어베이스 파이어스토어

Capacitor 플러그인 - 파이어베이스 클라우드 파이어스토어

__CAPGO_KEEP_0__ 가이드

Firebase Firestore에 대한 튜토리얼

@capgo/capacitor-firebase-firestore 사용

Capacitor 플러그인 - Firebase Cloud Firestore.

설치

bun add @capgo/capacitor-firebase-firestore
bunx cap sync

이 플러그인이 제공하는 것

  • addDocument - 지정된 데이터로 컬렉션에 새로운 문서를 추가합니다.
  • setDocument - 지정된 참조에 대한 문서에 쓰기. 만약 문서가 아직 존재하지 않으면 새로 생성됩니다.
  • getDocument - 지정된 참조에 대한 문서를 읽습니다.
  • updateDocument - 지정된 참조에 대한 문서의 field를 업데이트합니다.

사용 예시

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

지정된 참조에 의해 참조되는 문서의 field를 업데이트합니다.

import { FirebaseFirestore } from '@capgo/capacitor-firebase-firestore';

await FirebaseFirestore.updateDocument({} as UpdateDocumentOptions);

전체 참조

capgo에서 계속하기: Using @capgo/capacitor-firebase-firestore

이러한 경우 Using @capgo/capacitor-firebase-firestore native plugin 작업을 계획하고자 할 때, @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-firebase-firestore와 연결하세요. Capgo 플러그인 디렉토리 Capgo 플러그인 디렉토리에서 제품 워크플로우를 위해 Capacitor 플러그인들에 의해 Capgo Capacitor 플러그인들에 의해 Capgo의 구현 세부 사항을 위해 플러그인을 추가하거나 업데이트 플러그인을 추가하거나 업데이트에서 구현 세부 사항을 위해 아이오닉 엔터프라이즈 플러그인 대체 아이오닉 엔터프라이즈 플러그인 대체에서 제품 워크플로우를 위해, 그리고 Capgo 네이티브 빌드 Capgo 네이티브 빌드에서 제품 워크플로우를 위해