redis-rb icon indicating copy to clipboard operation
redis-rb copied to clipboard

[Redis 6.2] Add GEOSEARCH command

Open uxgnod opened this issue 2 years ago • 3 comments

Add support for GEOSEARCH command, which is available since 6.2.0.

Reference: https://github.com/redis/redis-rb/issues/978

uxgnod avatar Feb 24 '22 05:02 uxgnod

The CI failure is legit, you have a syntax error.

As for the API, I'm not a fan of these keyword being used for two different things based on the passed type, it seems brittle to me.

I think I'd prefer:

def geosearch(key, from_member: nil, from_lonlat, by_radius: nil, by_box: nil, **options)
end

byroot avatar Feb 24 '22 09:02 byroot

The CI failure is legit, you have a syntax error.

As for the API, I'm not a fan of these keyword being used for two different things based on the passed type, it seems brittle to me.

I think I'd prefer:

def geosearch(key, from_member: nil, from_lonlat, by_radius: nil, by_box: nil, **options)
end

Thanks for the advice, I really don't have much experience and I will try to fix these errors.

Also, can you please tell me how I should test this code locally?

uxgnod avatar Feb 24 '22 09:02 uxgnod

Also, can you please tell me how I should test this code locally?

You can run make then make test.

byroot avatar Feb 24 '22 11:02 byroot