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

Method orderBy

packages/firebase-firestore/index.android.ts:531–545  ·  view source on GitHub ↗
(fieldPath: keyof DocumentData | FieldPath, directionStr: 'asc' | 'desc' = 'asc')

Source from the content-addressed store, hash-verified

529 }
530
531 orderBy(fieldPath: keyof DocumentData | FieldPath, directionStr: 'asc' | 'desc' = 'asc'): Query {
532 if (fieldPath instanceof FieldPath) {
533 if (directionStr === 'asc') {
534 return Query.fromNative(this.native.orderBy(fieldPath.native));
535 } else {
536 return Query.fromNative(this.native.orderBy(fieldPath.native, com.google.firebase.firestore.Query.Direction.DESCENDING));
537 }
538 } else {
539 if (directionStr === 'asc') {
540 return Query.fromNative(this.native.orderBy(fieldPath as any));
541 } else {
542 return Query.fromNative(this.native.orderBy(fieldPath as any, com.google.firebase.firestore.Query.Direction.DESCENDING));
543 }
544 }
545 }
546
547 startAfter(snapshot: DocumentSnapshot<T>): Query;
548 startAfter(fieldValues: FieldValue[]): Query;

Callers

nothing calls this directly

Calls 2

orderByMethod · 0.65
fromNativeMethod · 0.45

Tested by

no test coverage detected