Skip to content

Commit

Permalink
TsAlign, TsBucketTimestamp, TsRangeQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
tompro committed Dec 11, 2022
1 parent e487963 commit 1329359
Show file tree
Hide file tree
Showing 3 changed files with 247 additions and 48 deletions.
29 changes: 13 additions & 16 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ pub trait TsCommands: ConnectionLike + Sized {
FTS: ToRedisArgs,
TTS: ToRedisArgs,
C: ToRedisArgs,
TS: std::marker::Copy + FromRedisValue,
V: std::marker::Copy + FromRedisValue,
TS: Copy + FromRedisValue,
V: Copy + FromRedisValue,
>(
&mut self,
command: &str,
Expand All @@ -226,8 +226,8 @@ pub trait TsCommands: ConnectionLike + Sized {
FTS: ToRedisArgs,
TTS: ToRedisArgs,
C: ToRedisArgs,
TS: std::marker::Copy + FromRedisValue,
V: std::marker::Copy + FromRedisValue,
TS: Copy + FromRedisValue,
V: Copy + FromRedisValue,
>(
&mut self,
key: K,
Expand All @@ -252,8 +252,8 @@ pub trait TsCommands: ConnectionLike + Sized {
FTS: ToRedisArgs,
TTS: ToRedisArgs,
C: ToRedisArgs,
TS: std::marker::Copy + FromRedisValue,
V: std::marker::Copy + FromRedisValue,
TS: Copy + FromRedisValue,
V: Copy + FromRedisValue,
>(
&mut self,
key: K,
Expand All @@ -277,8 +277,8 @@ pub trait TsCommands: ConnectionLike + Sized {
FTS: ToRedisArgs,
TTS: ToRedisArgs,
C: ToRedisArgs,
TS: std::default::Default + FromRedisValue + Copy,
V: std::default::Default + FromRedisValue + Copy,
TS: Default + FromRedisValue + Copy,
V: Default + FromRedisValue + Copy,
>(
&mut self,
command: &str,
Expand All @@ -302,8 +302,8 @@ pub trait TsCommands: ConnectionLike + Sized {
FTS: ToRedisArgs,
TTS: ToRedisArgs,
C: ToRedisArgs,
TS: std::default::Default + FromRedisValue + Copy,
V: std::default::Default + FromRedisValue + Copy,
TS: Default + FromRedisValue + Copy,
V: Default + FromRedisValue + Copy,
>(
&mut self,
from_timestamp: FTS,
Expand All @@ -327,8 +327,8 @@ pub trait TsCommands: ConnectionLike + Sized {
FTS: ToRedisArgs,
TTS: ToRedisArgs,
C: ToRedisArgs,
TS: std::default::Default + FromRedisValue + Copy,
V: std::default::Default + FromRedisValue + Copy,
TS: Default + FromRedisValue + Copy,
V: Default + FromRedisValue + Copy,
>(
&mut self,
from_timestamp: FTS,
Expand Down Expand Up @@ -356,10 +356,7 @@ pub trait TsCommands: ConnectionLike + Sized {
}

/// Returns the latest (current) value from multiple redis time series.
fn ts_mget<
TS: std::default::Default + FromRedisValue,
V: std::default::Default + FromRedisValue,
>(
fn ts_mget<TS: Default + FromRedisValue, V: Default + FromRedisValue>(
&mut self,
filter_options: TsFilterOptions,
) -> RedisResult<TsMget<TS, V>> {
Expand Down
8 changes: 5 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
//! redis_ts::TsCommands into the scope. All redis time series
//! commands will then be available on your redis connection.
//!
//!
//!
//! ```rust,no_run
//! # fn run() -> redis::RedisResult<()> {
//! use redis::Commands;
Expand Down Expand Up @@ -338,14 +338,16 @@
//! # Ok(()) }
//! ```
//!
extern crate core;

#[cfg(any(feature = "tokio-comp", feature = "async-std-comp"))]
pub use crate::async_commands::AsyncTsCommands;

pub use crate::commands::TsCommands;

pub use crate::types::{
TsAggregationType, TsDuplicatePolicy, TsFilterOptions, TsInfo, TsMget, TsMrange, TsOptions,
TsRange,
TsAggregationType, TsAlign, TsBucketTimestamp, TsDuplicatePolicy, TsFilterOptions, TsInfo,
TsMget, TsMrange, TsOptions, TsRange, TsRangeQuery,
};

#[cfg(any(feature = "tokio-comp", feature = "async-std-comp"))]
Expand Down
Loading

0 comments on commit 1329359

Please sign in to comment.