pub struct PartitionMap {
pub table: String,
pub partition_type: PartitionType,
pub num_partitions: usize,
}Expand description
파티션 맵 — 테이블 하나의 파티션 구성 전체를 담음
Fields§
§table: String원본 테이블 이름
partition_type: PartitionType파티션 타입
num_partitions: usize총 파티션 수
Implementations§
Source§impl PartitionMap
impl PartitionMap
Sourcepub fn route_key(&self, key_value: &PartitionValue) -> String
pub fn route_key(&self, key_value: &PartitionValue) -> String
key 값을 받아 sub-table 이름 반환
반환 형식: {table}__p_part_{idx}
Sourcepub fn pruned_partitions(
&self,
filter_value: Option<&PartitionValue>,
) -> Vec<String>
pub fn pruned_partitions( &self, filter_value: Option<&PartitionValue>, ) -> Vec<String>
WHERE 조건값으로 스캔할 파티션 목록 반환 (Pruning)
filter_value = None→ 모든 파티션 반환 (full scan)filter_value = Some(v)→ 해당 v가 속한 파티션만 반환
Sourcepub fn all_partitions(&self) -> Vec<String>
pub fn all_partitions(&self) -> Vec<String>
모든 파티션의 sub-table 이름 반환
Sourcepub fn route_or_expand(&self, key_value: &PartitionValue) -> RouteResult
pub fn route_or_expand(&self, key_value: &PartitionValue) -> RouteResult
자동 확장이 필요한지 파악하는 함수
Trait Implementations§
Source§impl Clone for PartitionMap
impl Clone for PartitionMap
Source§fn clone(&self) -> PartitionMap
fn clone(&self) -> PartitionMap
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 PartitionMap
impl RefUnwindSafe for PartitionMap
impl Send for PartitionMap
impl Sync for PartitionMap
impl Unpin for PartitionMap
impl UnsafeUnpin for PartitionMap
impl UnwindSafe for PartitionMap
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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