Skip to content
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

fix(firestore): fix an issue where using FieldPath in orderBy would lead to a native error being thrown #6814

Merged
merged 12 commits into from
Jan 10, 2023

Conversation

Lyokone
Copy link
Contributor

@Lyokone Lyokone commented Jan 4, 2023

Description

Instead of always transforming the orderBy into a String, I allow the bridge to keep the reference to a FieldPath in order to be able to use FieldPath in native also.

Related issues

closes #6602

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan


Think react-native-firebase is great? Please consider supporting the project with any of the below:

@vercel
Copy link

vercel bot commented Jan 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 9, 2023 at 10:17AM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
react-native-firebase-next ⬜️ Ignored (Inspect) Jan 9, 2023 at 10:17AM (UTC)

@Lyokone Lyokone changed the title fix(firestore): fix an issue with FieldPath conditions fix(firestore): fix an issue where using FieldPath in orderBy would lead to a native error being thrown Jan 5, 2023
@codecov
Copy link

codecov bot commented Jan 9, 2023

Codecov Report

Merging #6814 (50e06b5) into main (54f6012) will decrease coverage by 0.38%.
The diff coverage is 78.58%.

@@             Coverage Diff              @@
##               main    #6814      +/-   ##
============================================
- Coverage     54.42%   54.05%   -0.37%     
+ Complexity      700      691       -9     
============================================
  Files           218      218              
  Lines         10800    10814      +14     
  Branches       1700     1707       +7     
============================================
- Hits           5877     5844      -33     
- Misses         4610     4677      +67     
+ Partials        313      293      -20     

Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me - thank you !

export function extractFieldPathData(data, segmenets) {
export function extractFieldPathData(data, segments) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆 🤦

@mikehardy mikehardy merged commit 84d7bbe into main Jan 10, 2023
@mikehardy mikehardy deleted the fix/6602 branch January 10, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛] Firestore orderBy treats FieldPath differently than where
2 participants