pub struct PartitionBuilder { /* private fields */ }Expand description
Builder for creating partition specifications.
Implementations§
Source§impl PartitionBuilder
impl PartitionBuilder
Sourcepub fn range_partition(self) -> Self
pub fn range_partition(self) -> Self
Set to range partitioning.
Sourcepub fn list_partition(self) -> Self
pub fn list_partition(self) -> Self
Set to list partitioning.
Sourcepub fn hash_partition(self) -> Self
pub fn hash_partition(self) -> Self
Set to hash partitioning.
Sourcepub fn columns(
self,
columns: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn columns( self, columns: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Add multiple partition columns.
Sourcepub fn add_range(
self,
name: impl Into<String>,
from: RangeBound,
to: RangeBound,
) -> Self
pub fn add_range( self, name: impl Into<String>, from: RangeBound, to: RangeBound, ) -> Self
Add a range partition.
Sourcepub fn add_range_with_tablespace(
self,
name: impl Into<String>,
from: RangeBound,
to: RangeBound,
tablespace: impl Into<String>,
) -> Self
pub fn add_range_with_tablespace( self, name: impl Into<String>, from: RangeBound, to: RangeBound, tablespace: impl Into<String>, ) -> Self
Add a range partition with tablespace.
Sourcepub fn add_list(
self,
name: impl Into<String>,
values: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn add_list( self, name: impl Into<String>, values: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Add a list partition.
Sourcepub fn add_hash(
self,
name: impl Into<String>,
modulus: u32,
remainder: u32,
) -> Self
pub fn add_hash( self, name: impl Into<String>, modulus: u32, remainder: u32, ) -> Self
Add a hash partition.
Sourcepub fn add_hash_partitions(
self,
count: u32,
name_prefix: impl Into<String>,
) -> Self
pub fn add_hash_partitions( self, count: u32, name_prefix: impl Into<String>, ) -> Self
Add multiple hash partitions automatically.
Sourcepub fn build(self) -> QueryResult<Partition>
pub fn build(self) -> QueryResult<Partition>
Build the partition specification.
Trait Implementations§
Source§impl Clone for PartitionBuilder
impl Clone for PartitionBuilder
Source§fn clone(&self) -> PartitionBuilder
fn clone(&self) -> PartitionBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PartitionBuilder
impl RefUnwindSafe for PartitionBuilder
impl Send for PartitionBuilder
impl Sync for PartitionBuilder
impl Unpin for PartitionBuilder
impl UnwindSafe for PartitionBuilder
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