| 650 | } |
| 651 | |
| 652 | export 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 | |
| 685 | export class QuerySnapshot implements IQuerySnapshot { |
| 686 | _native: com.google.firebase.firestore.QuerySnapshot; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…