Skip to content

Rename methods to match Android/iOS #6155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions packages/firestore/src/core/target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,8 @@ export function targetGetLowerBound(
for (const segment of fieldIndexGetDirectionalSegments(fieldIndex)) {
const segmentBound =
segment.kind === IndexKind.ASCENDING
? targetGetLowerBoundForField(target, segment.fieldPath, target.startAt)
: targetGetUpperBoundForField(
target,
segment.fieldPath,
target.startAt
);
? targetGetAscendingBound(target, segment.fieldPath, target.startAt)
: targetGetDescendingBound(target, segment.fieldPath, target.startAt);

if (!segmentBound.value) {
// No lower bound exists
Expand Down Expand Up @@ -342,8 +338,8 @@ export function targetGetUpperBound(
for (const segment of fieldIndexGetDirectionalSegments(fieldIndex)) {
const segmentBound =
segment.kind === IndexKind.ASCENDING
? targetGetUpperBoundForField(target, segment.fieldPath, target.endAt)
: targetGetLowerBoundForField(target, segment.fieldPath, target.endAt);
? targetGetDescendingBound(target, segment.fieldPath, target.endAt)
: targetGetAscendingBound(target, segment.fieldPath, target.endAt);

if (!segmentBound.value) {
// No upper bound exists
Expand All @@ -360,7 +356,7 @@ export function targetGetUpperBound(
* Returns the value to use as the lower bound for ascending index segment at
* the provided `fieldPath` (or the upper bound for an descending segment).
*/
function targetGetLowerBoundForField(
function targetGetAscendingBound(
target: Target,
fieldPath: FieldPath,
bound: Bound | null
Expand Down Expand Up @@ -422,9 +418,9 @@ function targetGetLowerBoundForField(

/**
* Returns the value to use as the upper bound for ascending index segment at
* the provided `fieldPath` (or the lower bound for an descending segment).
* the provided `fieldPath` (or the lower bound for a descending segment).
*/
function targetGetUpperBoundForField(
function targetGetDescendingBound(
target: Target,
fieldPath: FieldPath,
bound: Bound | null
Expand Down