안내
파이어베이스.firestore에 대한 튜토리얼
파이어베이스.firestore를 사용하는 @capgo/capacitor-firebase-firestore
Capacitor 플러그인: 파이어베이스 클라우드.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
__CAPGO_KEEP_0__를 사용하는 경우 capgo와 capacitor-firebase-firestore를 사용하여 자연스러운 플러그인 작업을 계획하고 __CAPGO_KEEP_0__ 플러그인 디렉토리와 연결합니다. Capgo 플러그인 디렉토리에서 제품 워크플로우를 위한 Capgo 플러그인 디렉토리에서 __CAPGO_KEEP_1__ 플러그인 Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, 플러그인 추가 또는 업데이트 __CAPGO_KEEP_0__ 네이티브 빌드 아이오닉 엔터프라이즈 플러그인 대안 아이오닉 엔터프라이즈 플러그인 대안의 제품 워크플로우를 위한 Capgo 네이티브 빌드 Capgo 플러그인 디렉토리