summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnne Yang <evangeline-lun@foxmail.com>2022-10-25 23:11:46 +0800
committerGitHub <noreply@github.com>2022-10-25 18:11:46 +0300
commit0f2cc69ec2558f8a30d2d41b74a70d97d987f3d1 (patch)
tree83e6593a256c378f5ec28800235da5699a73a173
parent4200d54c748b8de7ae01ea9c0a45b149f32b5c19 (diff)
downloadredis-py-0f2cc69ec2558f8a30d2d41b74a70d97d987f3d1.tar.gz
Add to_string method for GeoValue (#2404)
* Add to_string method for GeoValue * fix code style * simplify code Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
-rw-r--r--redis/commands/search/querystring.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/redis/commands/search/querystring.py b/redis/commands/search/querystring.py
index 1da0387..3ff1320 100644
--- a/redis/commands/search/querystring.py
+++ b/redis/commands/search/querystring.py
@@ -132,6 +132,9 @@ class GeoValue(Value):
self.radius = radius
self.unit = unit
+ def to_string(self):
+ return f"[{self.lon} {self.lat} {self.radius} {self.unit}]"
+
class Node:
def __init__(self, *children, **kwparams):