pub struct SchemaVersionManager { /* private fields */ }Expand description
스키마 버전 관리자
테이블별 스키마 히스토리를 관리하고, 특정 시점의 스키마를 조회합니다. MVCC 패턴으로 무중단 DDL을 지원합니다.
DashMap 기반 락-프리 설계로 높은 동시성 읽기 성능을 제공합니다.
Implementations§
Source§impl SchemaVersionManager
impl SchemaVersionManager
Sourcepub fn alter_table(
&self,
table: &str,
new_schema: Arc<Schema>,
description: &str,
) -> DbxResult<u64>
pub fn alter_table( &self, table: &str, new_schema: Arc<Schema>, description: &str, ) -> DbxResult<u64>
스키마 변경 (새 버전 생성 — 무중단)
Sourcepub fn get_current(&self, table: &str) -> DbxResult<Arc<Schema>>
pub fn get_current(&self, table: &str) -> DbxResult<Arc<Schema>>
현재 스키마 조회 — O(1) DashMap 캐시 히트
Sourcepub fn get_at_version(
&self,
table: &str,
version: u64,
) -> DbxResult<Arc<Schema>>
pub fn get_at_version( &self, table: &str, version: u64, ) -> DbxResult<Arc<Schema>>
특정 시점의 스키마 조회 (MVCC 스냅샷)
Sourcepub fn version_history(&self, table: &str) -> DbxResult<Vec<SchemaVersion>>
pub fn version_history(&self, table: &str) -> DbxResult<Vec<SchemaVersion>>
스키마 버전 히스토리 조회
Sourcepub fn current_version(&self, table: &str) -> DbxResult<u64>
pub fn current_version(&self, table: &str) -> DbxResult<u64>
현재 버전 번호 조회
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaVersionManager
impl !RefUnwindSafe for SchemaVersionManager
impl Send for SchemaVersionManager
impl Sync for SchemaVersionManager
impl Unpin for SchemaVersionManager
impl UnsafeUnpin for SchemaVersionManager
impl UnwindSafe for SchemaVersionManager
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