[−][src]Struct oapth::Migration
A migration that is intended to be inserted into a database
Implementations
impl Migration
[src]
pub fn new<IN, ISD, ISU>(
version: i32,
name: IN,
sql_up: ISU,
sql_down: ISD
) -> Self where
IN: Into<String>,
ISD: Into<String>,
ISU: Into<String>,
[src]
version: i32,
name: IN,
sql_up: ISU,
sql_down: ISD
) -> Self where
IN: Into<String>,
ISD: Into<String>,
ISU: Into<String>,
Creates a new instance from all necessary input parameters.
pub fn checksum(&self) -> &str
[src]
Checksum
Example
use oapth::doc_tests::migration; assert_eq!(migration().checksum(), "10126747658053090972")
pub fn name(&self) -> &str
[src]
pub fn sql_down(&self) -> &str
[src]
Raw SQL for rollbacks
Example
use oapth::doc_tests::migration; assert_eq!(migration().sql_down(), "DROP TABLE author");
pub fn sql_up(&self) -> &str
[src]
Raw SQL for migrations
Example
use oapth::doc_tests::migration; let mg = assert_eq!( migration().sql_up(), "CREATE TABLE author (id INT NOT NULL PRIMARY KEY, name VARCHAR(50) NOT NULL)" );
pub fn version(&self) -> i32
[src]
Trait Implementations
impl Debug for Migration
[src]
impl Eq for Migration
[src]
impl Ord for Migration
[src]
fn cmp(&self, other: &Migration) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Migration> for Migration
[src]
impl PartialOrd<Migration> for Migration
[src]
fn partial_cmp(&self, other: &Migration) -> Option<Ordering>
[src]
fn lt(&self, other: &Migration) -> bool
[src]
fn le(&self, other: &Migration) -> bool
[src]
fn gt(&self, other: &Migration) -> bool
[src]
fn ge(&self, other: &Migration) -> bool
[src]
impl StructuralEq for Migration
[src]
impl StructuralPartialEq for Migration
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,