Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ serde = "1.0"
libc = "0.2"
jsonpath_lib = { git="https://github.com/RedisJSON/jsonpath.git", branch="public-parser" }
# redis-module = { version="0.15.0", features = ["experimental-api"]}
redis-module = { git = "https://github.com/RedisLabsModules/redismodule-rs", branch = "feature-search-json", features = ["experimental-api"] }
redis-module = { git = "https://github.com/RedisLabsModules/redismodule-rs", features = ["experimental-api"] }
lazy_static = "1.4.0"
# readies-wd40 = { path = "deps/readies/wd40" }

Expand Down
18 changes: 4 additions & 14 deletions src/c_api.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
use std::ffi::CString;
use std::os::raw::{c_double, c_int, c_long};
use std::ptr::null_mut;
use std::str::FromStr;
use std::{
ffi::CStr,
os::raw::{c_char, c_void},
};

use crate::redisjson::Format;
use crate::{redisjson::RedisJSON, REDIS_JSON_TYPE};
use redis_module::key::RedisKeyWritable;
use redis_module::logging::log_notice;
use redis_module::Context;
use redis_module::{raw as rawmod, RedisError};
use redis_module::{Context, NotifyEvent, Status};
use serde_json::Value;

use crate::redisjson::Format;
use crate::{redisjson::RedisJSON, REDIS_JSON_TYPE};
use std::str::FromStr;

// extern crate readies_wd40;
// use crate::readies_wd40::{BB, _BB, getenv};

Expand Down Expand Up @@ -611,12 +610,3 @@ pub struct RedisJSONAPI_V1<'a> {
str: *mut *mut rawmod::RedisModuleString,
) -> c_int,
}

pub fn notify_keyspace_event(
ctx: &Context,
event_type: NotifyEvent,
event: &str,
keyname: &str,
) -> Status {
ctx.notify_keyspace_event(event_type, event, keyname)
}
13 changes: 6 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#[macro_use]
extern crate redis_module;

use std::{i64, usize};

use redis_module::raw::RedisModuleTypeMethods;
use redis_module::{native_types::RedisType, NotifyEvent};
use redis_module::{raw as rawmod, NextArg};

use redis_module::{Context, RedisError, RedisResult, RedisValue, REDIS_OK};
use serde_json::{Number, Value};

use std::{i64, usize};
use crate::array_index::ArrayIndex;
use crate::c_api::export_shared_api;
use crate::error::Error;
use crate::redisjson::{Format, Path, RedisJSON, SetOptions};

mod array_index;
mod backward;
Expand All @@ -18,11 +22,6 @@ mod formatter;
mod nodevisitor;
mod redisjson;

use crate::array_index::ArrayIndex;
use crate::c_api::{export_shared_api, notify_keyspace_event};
use crate::error::Error;
use crate::redisjson::{Format, Path, RedisJSON, SetOptions};

// extern crate readies_wd40;
// use crate::readies_wd40::{BB, _BB, getenv};

Expand Down