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

feat(geo): add geosearchstore #4272

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andydunstall
Copy link
Contributor

Fixes #3883.

Adds support for GEOSEARCHSTORE. Follows the same approach as commands like XREAD/XREADGROUP with another FooGeneric method (note the naming is a bit confusing we theres both GeoSearchGeneric and GeoSearchStoreGeneric, but still seems like the cleanest option)

GeoSearchStoreGeneric already supports a store option so the changes here are small

@@ -3296,6 +3317,8 @@ void ZSetFamily::Register(CommandRegistry* registry) {
<< CI{"GEOPOS", CO::FAST | CO::READONLY, -2, 1, 1, acl::kGeoPos}.HFUNC(GeoPos)
<< CI{"GEODIST", CO::READONLY, -4, 1, 1, acl::kGeoDist}.HFUNC(GeoDist)
<< CI{"GEOSEARCH", CO::READONLY, -4, 1, 1, acl::kGeoSearch}.HFUNC(GeoSearch)
<< CI{"GEOSEARCHSTORE", CO::WRITE | CO::DENYOOM, -5, 1, 2, acl::kGeoSearchStore}.HFUNC(
Copy link
Contributor Author

@andydunstall andydunstall Dec 7, 2024

Choose a reason for hiding this comment

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

I'm slightly guessing here about what CO:: params to use, not sure when CO::DENYOOM is needed etc - so just copied ZRANGESTORE which seems similar

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.

implement GEOSEARCHSTORE
1 participant