pub struct Migration { /* private fields */ }Expand description
마이그레이션 스텝 — 세 소스(SQL 파일/인라인 SQL/코드)의 공통 표현 (명세 §8.2)
Implementations§
Source§impl Migration
impl Migration
Sourcepub fn sql(from: u32, to: u32, sql: impl Into<String>) -> Self
pub fn sql(from: u32, to: u32, sql: impl Into<String>) -> Self
인라인 SQL 스텝 — Migration::sql(1, 2, "ALTER TABLE …") (명세 §8.2)
Sourcepub fn sql_batch(from: u32, to: u32, sql: impl Into<String>) -> Self
pub fn sql_batch(from: u32, to: u32, sql: impl Into<String>) -> Self
여러 문장 SQL 스텝 — execute_batch와 동일(별칭, 의도 명시용)
Sourcepub fn code(
from: u32,
to: u32,
f: impl Fn(&Tx<'_>) -> Result<()> + Send + Sync + 'static,
) -> Self
pub fn code( from: u32, to: u32, f: impl Fn(&Tx<'_>) -> Result<()> + Send + Sync + 'static, ) -> Self
코드 스텝
Sourcepub fn from_step(step: impl MigrationStep) -> Self
pub fn from_step(step: impl MigrationStep) -> Self
trait 구현체 래핑 (명세 §8.3)
Sourcepub fn from_version(&self) -> u32
pub fn from_version(&self) -> u32
시작 버전 (명세 [C-3] 확정 이름)
Sourcepub fn to_version(&self) -> u32
pub fn to_version(&self) -> u32
도착 버전
Auto Trait Implementations§
impl !RefUnwindSafe for Migration
impl !UnwindSafe for Migration
impl Freeze for Migration
impl Send for Migration
impl Sync for Migration
impl Unpin for Migration
impl UnsafeUnpin for Migration
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