MCPcopy Create free account
hub / github.com/NativeScript/firebase / get

Method get

packages/firebase-firestore/index.ios.ts:420–443  ·  view source on GitHub ↗
(options?: GetOptions)

Source from the content-addressed store, hash-verified

418 }
419
420 get(options?: GetOptions): Promise<QuerySnapshot> {
421 let source: FIRFirestoreSource;
422 switch (options) {
423 case GetOptions.Cache:
424 source = FIRFirestoreSource.Cache;
425 break;
426 case GetOptions.Server:
427 source = FIRFirestoreSource.Server;
428 break;
429 default:
430 source = FIRFirestoreSource.Default;
431 break;
432 }
433
434 return new Promise((resolve, reject) => {
435 this.native.getDocumentsWithSourceCompletion(source, (snap, error) => {
436 if (error) {
437 reject(FirebaseError.fromNative(error));
438 } else {
439 resolve(QuerySnapshot.fromNative(snap));
440 }
441 });
442 });
443 }
444
445 limit(limit: number) {
446 return Query.fromNative(this.native.queryLimitedTo(limit));

Callers

nothing calls this directly

Calls 1

fromNativeMethod · 0.45

Tested by

no test coverage detected