Skip to main content

SchemaDiffEngine

Struct SchemaDiffEngine 

Source
pub struct SchemaDiffEngine;
Expand description

Schema diff engine

Implementations§

Source§

impl SchemaDiffEngine

Source

pub fn compare_tables( old_tables: &HashMap<String, Table>, new_tables: &HashMap<String, Table>, ) -> Vec<SchemaDiff>

Compare two schema states and return the differences

Source

pub fn compare_events( old_events: &HashMap<String, Event>, new_events: &HashMap<String, Event>, ) -> Vec<SchemaDiff>

Compare two event collections and return the differences

Source

pub fn compare_indexes( old_indexes: &HashMap<String, IndexMeta>, new_indexes: &HashMap<String, IndexMeta>, ) -> Vec<SchemaDiff>

Compare two index collections and return the differences

Source

pub fn compare_views( old_views: &HashMap<String, View>, new_views: &HashMap<String, View>, ) -> Vec<SchemaDiff>

Compare two view schema states and return the differences

Source

pub fn columns_equal(a: &Column, b: &Column) -> bool

Compare if two columns are equal

Source

pub fn generate_table_change_sql( table_name: &str, old_table: &Table, new_table: &Table, ) -> Vec<String>

Generate SQL for a specific table change

Source

pub fn generate_view_change_sql( view_name: &str, old_view: &View, new_view: &View, ) -> Vec<String>

Generate SQL for a specific view change

Source

pub fn generate_index_change_sql( index_name: &str, old_index: &IndexMeta, new_index: &IndexMeta, ) -> Vec<String>

Generate SQL for a specific index change

Source

pub fn generate_event_change_sql( event_name: &str, old_event: &Event, new_event: &Event, ) -> Vec<String>

Generate SQL for a specific event change

Source

pub fn generate_role_change_sql( role_name: &str, old_role: &Role, new_role: &Role, ) -> Vec<String>

Generate SQL for a specific role change

Source

pub fn generate_grant_change_sql( grant_name: &str, old_grant: &Grant, new_grant: &Grant, ) -> Vec<String>

Generate SQL for a specific grant change

Source

pub fn compare_roles( old_roles: &HashMap<String, Role>, new_roles: &HashMap<String, Role>, ) -> Vec<SchemaDiff>

Compare role collections

Source

pub fn compare_grants( old_grants: &HashMap<String, Grant>, new_grants: &HashMap<String, Grant>, ) -> Vec<SchemaDiff>

Compare grant collections

Source

pub fn compare_functions( old_functions: &HashMap<String, StoredFunction>, new_functions: &HashMap<String, StoredFunction>, ) -> Vec<SchemaDiff>

Compare functions and generate differences

Source

pub fn compare_procedures( old_procedures: &HashMap<String, StoredProcedure>, new_procedures: &HashMap<String, StoredProcedure>, ) -> Vec<SchemaDiff>

Compare procedures and generate differences

Source

pub fn compare_triggers( old_triggers: &HashMap<String, Trigger>, new_triggers: &HashMap<String, Trigger>, ) -> Vec<SchemaDiff>

Compare triggers and generate differences

Source

pub fn compare_composite_types( old_composite_types: &HashMap<String, CompositeType>, new_composite_types: &HashMap<String, CompositeType>, ) -> Vec<SchemaDiff>

Compare composite types and generate differences

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more