pub enum CollationChange {
Create(Collation),
Drop {
qname: QualifiedName,
},
Rename {
from: QualifiedName,
to: Identifier,
},
Replace {
from: Collation,
to: Collation,
},
CommentOn {
qname: QualifiedName,
comment: Option<String>,
},
}Expand description
A structural change to a single collation.
Variants§
Create(Collation)
CREATE COLLATION ...
Drop
DROP COLLATION qname — destructive.
Emitted by diff_schemas when
dropping a schema that contains collations: PG error 2BP01 fires if
DROP SCHEMA X executes while collations in X are still live.
Not emitted by diff_collations directly — collations are lenient
there (no auto-drop for target-only collations; unmanaged drift
surfaces via the unmanaged-collation lint instead).
Fields
qname: QualifiedNameSchema-qualified collation name.
Rename
ALTER COLLATION qname RENAME TO new_name.
Not emitted by the differ: rename intent is not structurally derivable from name-mismatched-but-same-shape collations (the user could equally have meant drop-old + create-new). This variant exists for the parser and future explicit-rename use cases.
Replace
DROP COLLATION old; CREATE COLLATION new; — PG has no in-place
ALTER for provider / locale / deterministic.
Fields
CommentOn
COMMENT ON COLLATION qname IS '...'.
Fields
qname: QualifiedNameSchema-qualified collation name.
Trait Implementations§
Source§impl Clone for CollationChange
impl Clone for CollationChange
Source§fn clone(&self) -> CollationChange
fn clone(&self) -> CollationChange
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CollationChange
impl Debug for CollationChange
Source§impl<'de> Deserialize<'de> for CollationChange
impl<'de> Deserialize<'de> for CollationChange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for CollationChange
Source§impl PartialEq for CollationChange
impl PartialEq for CollationChange
Source§fn eq(&self, other: &CollationChange) -> bool
fn eq(&self, other: &CollationChange) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CollationChange
impl Serialize for CollationChange
impl StructuralPartialEq for CollationChange
Auto Trait Implementations§
impl Freeze for CollationChange
impl RefUnwindSafe for CollationChange
impl Send for CollationChange
impl Sync for CollationChange
impl Unpin for CollationChange
impl UnsafeUnpin for CollationChange
impl UnwindSafe for CollationChange
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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