pub struct PartitionManager { /* private fields */ }Expand description
Partition manager for automatic partition management
Implementations§
Source§impl PartitionManager
impl PartitionManager
Sourcepub async fn create_partitioned_table(
&self,
_table_name: &str,
strategy: &PartitioningStrategy,
create_table_sql: &str,
) -> Result<()>
pub async fn create_partitioned_table( &self, _table_name: &str, strategy: &PartitioningStrategy, create_table_sql: &str, ) -> Result<()>
Create partitioned table
Sourcepub async fn create_partition(
&self,
table_name: &str,
partition_name: &str,
from_value: &str,
to_value: &str,
) -> Result<()>
pub async fn create_partition( &self, table_name: &str, partition_name: &str, from_value: &str, to_value: &str, ) -> Result<()>
Create a single partition
Sourcepub async fn create_time_partition(
&self,
table_name: &str,
date: DateTime<Utc>,
interval: PartitionInterval,
) -> Result<String>
pub async fn create_time_partition( &self, table_name: &str, date: DateTime<Utc>, interval: PartitionInterval, ) -> Result<String>
Create time-based partition
Sourcepub async fn create_hash_partition(
&self,
table_name: &str,
partition_index: usize,
modulus: usize,
) -> Result<String>
pub async fn create_hash_partition( &self, table_name: &str, partition_index: usize, modulus: usize, ) -> Result<String>
Create hash partition
Sourcepub async fn drop_partition(&self, partition_name: &str) -> Result<()>
pub async fn drop_partition(&self, partition_name: &str) -> Result<()>
Drop partition
Sourcepub async fn list_partitions(&self, table_name: &str) -> Result<Vec<String>>
pub async fn list_partitions(&self, table_name: &str) -> Result<Vec<String>>
List all partitions for a table
Sourcepub async fn partition_stats(&self, table_name: &str) -> Result<PartitionStats>
pub async fn partition_stats(&self, table_name: &str) -> Result<PartitionStats>
Get partition statistics
Auto Trait Implementations§
impl Freeze for PartitionManager
impl !RefUnwindSafe for PartitionManager
impl Send for PartitionManager
impl Sync for PartitionManager
impl Unpin for PartitionManager
impl !UnwindSafe for PartitionManager
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