Skip to content

Conversation

@RaMin0
Copy link
Contributor

@RaMin0 RaMin0 commented Mar 14, 2018

Use updateChildValues (and setPriority) in favor of setValuesAndPriority to avoid overwriting other child values.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers
  • Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
  • The email used to register you as an authorized contributor must also be attached to your GitHub account.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers
  • Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
  • The email used to register you as an authorized contributor must also be attached to your GitHub account.

@RaMin0
Copy link
Contributor Author

RaMin0 commented Mar 14, 2018

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

Use updateChildValues (and setPriority) in favor of setValuesAndPriority to avoid overwriting other child values.
@morganchen12
Copy link
Contributor

@mcdonamp please review

@asciimike
Copy link
Contributor

@RaMin0 @morganchen12 it looks like we don't actually need priority (we store the geohash in g and query by that, rather than priority), so I'd just remove the code and tests for priority and use update, no need to do the second update.

Presumably this is so you can store additional data alongside the GeoFire info?

@RaMin0
Copy link
Contributor Author

RaMin0 commented Mar 15, 2018

@mcdonamp: Presumably this is so you can store additional data alongside the GeoFire info

Yes, it made more sense to save the related info stored in the same node rather than having a parallel node that I have to maintain just to keep the extra info.

One other thing I suggest to do is to make the name of the location key (currently l) configurable, to give more context. pickUpLocation is more significant than just l. But that's an issue for another PR.

Priority is no longer used. The geohash is stored in and queried by g
@RaMin0
Copy link
Contributor Author

RaMin0 commented Mar 15, 2018

@mcdonamp Check 96f4043.

};

XCTAssertEqualObjects(snapshot.value, expected);
XCTAssertEqualObjects([snapshot childSnapshotForPath:@"loc1"].priority, @"7zzzzzzzzz");
Copy link
Contributor

Choose a reason for hiding this comment

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

Please instead test g rather than priority. We'd like to make sure everything still works :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isn't it already tested on the previous line when comparing the whole value of the snapshot?

Copy link
Contributor

Choose a reason for hiding this comment

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

Derp, yes.

@asciimike asciimike merged commit dc408bc into firebase:master Mar 15, 2018
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.

4 participants