-
Notifications
You must be signed in to change notification settings - Fork 10
Add lua and geo* support #69
base: master
Are you sure you want to change the base?
Conversation
|
||
fn script_exists<S: Into<MultipleKeys>>(&self, sha1: S) -> Box<Future<Item=Vec<bool>, Error=RedisError>>; | ||
|
||
fn evalsha<S: Into<String>, K: Into<MultipleKeys>, V: Into<MultipleValues>>(&self, sha1: S, keys: K, args: V) -> Box<Future<Item=Vec<RedisValue>, Error=RedisError>>; |
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.
It should be more readable with where clause.
RedisCommandKind::ScriptLoad | ||
| RedisCommandKind::ScriptExists | ||
| RedisCommandKind::ScriptFlush | ||
| RedisCommandKind::ScriptKill => true, |
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.
Maybe EVAL and EVALSHA should be script commands too?
fn georadius<K: Into<RedisKey>>(&self, key: K, longitude: Longitude, latitude: Latitude, radius: f64, unit: GeoUnit, | ||
withcoord: bool, withdist: bool, withhash: bool, count: Option<usize>, | ||
order: Option<GeoOrdering>, store: Option<String>, storedist: Option<String>) | ||
-> Box<Future<Item=Vec<RedisValue>, Error=RedisError>> |
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.
Do you use rustfmt? It's brilliant tool.
@@ -36,7 +36,13 @@ const WITH_SCORES: &'static str = "WITHSCORES"; | |||
const LIMIT: &'static str = "LIMIT"; | |||
const AGGREGATE: &'static str = "AGGREGATE"; | |||
const WEIGHTS: &'static str = "WEIGHTS"; | |||
|
|||
const ASC: &'static str = "ASC"; |
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 static
for const.
const ASC: &str = "ASC";
/// Scripts are cached on the server side using the SCRIPT LOAD command. | ||
/// | ||
/// <https://redis.io/commands/evalsha> | ||
fn evalsha<S: Into<String>, K: Into<MultipleKeys>, V: Into<MultipleValues>>(self, sha1: S, keys: K, args: V) -> Box<Future<Item=(Self, Vec<RedisValue>), Error=RedisError>> { |
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.
Simple eval
isn't provided?
@@ -8,6 +8,7 @@ mod pubsub; | |||
mod sets; | |||
mod other; | |||
mod sorted_sets; | |||
mod geo; |
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.
Why files geo/utils.rs
and lua/mod.rs
are empty?)
No description provided.