Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Add lua and geo* support #69

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Add lua and geo* support #69

wants to merge 7 commits into from

Conversation

alecembke-okta
Copy link
Contributor

No description provided.

This was referenced Nov 11, 2019

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>>;
Copy link

@RicoGit RicoGit Nov 12, 2019

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,
Copy link

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>>
Copy link

@RicoGit RicoGit Nov 12, 2019

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";
Copy link

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>> {
Copy link

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;
Copy link

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?)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants