pub struct RedisConverter { /* private fields */ }Expand description
Redis 转换器
Implementations§
Source§impl RedisConverter
impl RedisConverter
pub fn new(config: KvConversionConfig) -> Self
pub fn with_default_config() -> Self
Sourcepub fn convert_to_redis(
&self,
table_name: &str,
data: &Map<String, Value>,
mappings: &[FieldMapping],
) -> Result<Vec<RedisCommand>>
pub fn convert_to_redis( &self, table_name: &str, data: &Map<String, Value>, mappings: &[FieldMapping], ) -> Result<Vec<RedisCommand>>
将关系型数据转换为 Redis 格式
Sourcepub fn generate_commands(
&self,
table_name: &str,
data_list: &[Map<String, Value>],
mappings: &[FieldMapping],
) -> Result<Vec<RedisCommand>>
pub fn generate_commands( &self, table_name: &str, data_list: &[Map<String, Value>], mappings: &[FieldMapping], ) -> Result<Vec<RedisCommand>>
生成 Redis 命令列表
Auto Trait Implementations§
impl Freeze for RedisConverter
impl RefUnwindSafe for RedisConverter
impl Send for RedisConverter
impl Sync for RedisConverter
impl Unpin for RedisConverter
impl UnsafeUnpin for RedisConverter
impl UnwindSafe for RedisConverter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more