pub struct TaodbConverter { /* private fields */ }Expand description
Taodb 转换器
Implementations§
Source§impl TaodbConverter
impl TaodbConverter
pub fn new(config: TimeSeriesConfig) -> Self
pub fn with_default_config() -> Self
Sourcepub fn convert_to_taodb(
&self,
data: &HashMap<String, Value>,
_mappings: &[FieldMapping],
) -> Result<TaodbRecord>
pub fn convert_to_taodb( &self, data: &HashMap<String, Value>, _mappings: &[FieldMapping], ) -> Result<TaodbRecord>
转换为 Taodb 格式
Sourcepub fn generate_insert_sql(&self, record: &TaodbRecord) -> String
pub fn generate_insert_sql(&self, record: &TaodbRecord) -> String
生成 Taodb 插入语句
Trait Implementations§
Source§impl TimeSeriesConverter for TaodbConverter
impl TimeSeriesConverter for TaodbConverter
Source§fn convert(
&self,
data: &HashMap<String, Value>,
_mappings: &[FieldMapping],
) -> Result<TimeSeriesPoint>
fn convert( &self, data: &HashMap<String, Value>, _mappings: &[FieldMapping], ) -> Result<TimeSeriesPoint>
转换数据
Source§fn convert_batch(
&self,
data_list: &[HashMap<String, Value>],
mappings: &[FieldMapping],
) -> Result<Vec<TimeSeriesPoint>>
fn convert_batch( &self, data_list: &[HashMap<String, Value>], mappings: &[FieldMapping], ) -> Result<Vec<TimeSeriesPoint>>
批量转换
Auto Trait Implementations§
impl Freeze for TaodbConverter
impl RefUnwindSafe for TaodbConverter
impl Send for TaodbConverter
impl Sync for TaodbConverter
impl Unpin for TaodbConverter
impl UnsafeUnpin for TaodbConverter
impl UnwindSafe for TaodbConverter
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