-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* JAVA: Add command GEODIST (#272) * JAVA: Add command GEODIST * allowing for overloaded signature to pass command with no metric option * undo changes to examplesApp * removing geoadd from geodist example * converting comments to javadocs, removing explicit array creation & redundant test case --------- Co-authored-by: TJ Zhang <tj.zhang@improving.com> * fixing comment * addressing review comments * adding clickable link for metric value in javadoc --------- Co-authored-by: TJ Zhang <tj.zhang@improving.com>
- Loading branch information
1 parent
3af09e0
commit 2f46606
Showing
8 changed files
with
233 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
java/client/src/main/java/glide/api/models/commands/geospatial/GeoUnit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** Copyright GLIDE-for-Redis Project Contributors - SPDX Identifier: Apache-2.0 */ | ||
package glide.api.models.commands.geospatial; | ||
|
||
import glide.api.commands.GeospatialIndicesBaseCommands; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
/** | ||
* Enumeration representing distance units options for the {@link | ||
* GeospatialIndicesBaseCommands#geodist(String, String, String, GeoUnit)} command. | ||
*/ | ||
@RequiredArgsConstructor | ||
@Getter | ||
public enum GeoUnit { | ||
/** Represents distance in meters. */ | ||
METERS("m"), | ||
/** Represents distance in kilometers. */ | ||
KILOMETERS("km"), | ||
/** Represents distance in miles. */ | ||
MILES("mi"), | ||
/** Represents distance in feet. */ | ||
FEET("ft"); | ||
|
||
private final String redisApi; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters