-
Notifications
You must be signed in to change notification settings - Fork 68
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
Python: adds GEOADD command #1259
Conversation
c527860
to
94f0281
Compare
@@ -143,6 +143,7 @@ enum RequestType { | |||
Blpop = 100; | |||
RPushX = 102; | |||
LPushX = 103; | |||
GeoAdd = 104; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: you may have number conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, it's fine
|
||
The exact limits, as specified by EPSG:900913 / EPSG:3785 / OSGEO:41001 are the following: | ||
- Valid longitudes are from -180 to 180 degrees. | ||
- Valid latitudes are from -85.05112878 to 85.05112878 degrees. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The north pole is out of range - wow
} | ||
assert await redis_client.geoadd(key, members_coordinates) == 2 | ||
members_coordinates["Catania"].latitude = 39 | ||
assert ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can skip ()
after assert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its the linter :)
c7f989f
to
c9ab616
Compare
) | ||
== 2 | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can query the key with ZRANGE
to show/check its content
See example for geosearchstore
at the very bottom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not exactly true, its after storing the dist in a different key using geosearchstore
c9ab616
to
4d97227
Compare
@@ -33,7 +33,7 @@ | |||
|
|||
class ConditionalChange(Enum): | |||
""" | |||
A condition to the "SET" and "ZADD" commands. | |||
A condition to the `SET`, `ZADD` and `GEOADD` commands. | |||
- ONLY_IF_EXISTS - Only update key / elements that already exist. Equivalent to `XX` in the Redis API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Redis', redis.io and other possible trademarks.
I dont think we should continue to introduce these into our code.
Instead, I propose to use RESP3 i.e. 'Equivalent to XX
in the RESP protocol.
Please consult with @asafpamzn ( you can setup a call for all of us)
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.