MCPcopy Index your code
hub / github.com/NativeScript/firebase / QueryDocumentSnapshot

Class QueryDocumentSnapshot

packages/firebase-firestore/index.android.ts:652–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650}
651
652export class QueryDocumentSnapshot<T extends DocumentData = DocumentData> extends DocumentSnapshot<T> implements IQueryDocumentSnapshot<T> {
653 _native: com.google.firebase.firestore.DocumentSnapshot;
654
655 static fromNative(snapshot: com.google.firebase.firestore.DocumentSnapshot) {
656 if (snapshot instanceof com.google.firebase.firestore.DocumentSnapshot) {
657 const ss = new QueryDocumentSnapshot();
658 ss._native = snapshot;
659 return ss;
660 }
661 return null;
662 }
663
664 data() {
665 return deserializeField(this._native.getData());
666 }
667
668 get<fieldType extends DocumentFieldType>(fieldPath: string | number | FieldPath): fieldType {
669 if (fieldPath instanceof FieldPath) {
670 return deserializeField(this.native.get(fieldPath.native));
671 } else {
672 return deserializeField(this.native.get(String(fieldPath)));
673 }
674 }
675
676 get native() {
677 return this._native;
678 }
679
680 get android() {
681 return this.native;
682 }
683}
684
685export class QuerySnapshot implements IQuerySnapshot {
686 _native: com.google.firebase.firestore.QuerySnapshot;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…