pub struct TimescaleDbConverter { /* private fields */ }Expand description
TimescaleDB 转换器
Implementations§
Source§impl TimescaleDbConverter
impl TimescaleDbConverter
pub fn new(config: TimeSeriesConfig) -> Self
pub fn with_default_config() -> Self
Sourcepub fn generate_hypertable_sql(&self) -> String
pub fn generate_hypertable_sql(&self) -> String
生成创建超表的 SQL
Trait Implementations§
Source§impl TimeSeriesConverter for TimescaleDbConverter
impl TimeSeriesConverter for TimescaleDbConverter
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 TimescaleDbConverter
impl RefUnwindSafe for TimescaleDbConverter
impl Send for TimescaleDbConverter
impl Sync for TimescaleDbConverter
impl Unpin for TimescaleDbConverter
impl UnsafeUnpin for TimescaleDbConverter
impl UnwindSafe for TimescaleDbConverter
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