pub struct ConstraintUsingIndex {
pub name: Option<Ident>,
pub index_name: Ident,
pub characteristics: Option<ConstraintCharacteristics>,
}Expand description
PostgreSQL constraint that promotes an existing unique index to a table constraint.
[ CONSTRAINT constraint_name ] { UNIQUE | PRIMARY KEY } USING INDEX index_name [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
See https://www.postgresql.org/docs/current/sql-altertable.html
Fields§
§name: Option<Ident>Optional constraint name.
index_name: IdentThe name of the existing unique index to promote.
characteristics: Option<ConstraintCharacteristics>Optional characteristics like DEFERRABLE.
Implementations§
Source§impl ConstraintUsingIndex
impl ConstraintUsingIndex
Sourcepub fn fmt_with_keyword(&self, f: &mut Formatter<'_>, keyword: &str) -> Result
pub fn fmt_with_keyword(&self, f: &mut Formatter<'_>, keyword: &str) -> Result
Format as [CONSTRAINT name] <keyword> USING INDEX index_name [characteristics].
Trait Implementations§
Source§impl Clone for ConstraintUsingIndex
impl Clone for ConstraintUsingIndex
Source§fn clone(&self) -> ConstraintUsingIndex
fn clone(&self) -> ConstraintUsingIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConstraintUsingIndex
impl Debug for ConstraintUsingIndex
Source§impl<'de> Deserialize<'de> for ConstraintUsingIndex
impl<'de> Deserialize<'de> for ConstraintUsingIndex
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ConstraintUsingIndex
impl Hash for ConstraintUsingIndex
Source§impl Ord for ConstraintUsingIndex
impl Ord for ConstraintUsingIndex
Source§fn cmp(&self, other: &ConstraintUsingIndex) -> Ordering
fn cmp(&self, other: &ConstraintUsingIndex) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ConstraintUsingIndex
impl PartialEq for ConstraintUsingIndex
Source§impl PartialOrd for ConstraintUsingIndex
impl PartialOrd for ConstraintUsingIndex
Source§impl Serialize for ConstraintUsingIndex
impl Serialize for ConstraintUsingIndex
Source§impl Spanned for ConstraintUsingIndex
impl Spanned for ConstraintUsingIndex
Source§impl Visit for ConstraintUsingIndex
impl Visit for ConstraintUsingIndex
Source§impl VisitMut for ConstraintUsingIndex
impl VisitMut for ConstraintUsingIndex
Source§fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
Mutably visit this node with the provided
VisitorMut. Read moreimpl Eq for ConstraintUsingIndex
impl StructuralPartialEq for ConstraintUsingIndex
Auto Trait Implementations§
impl Freeze for ConstraintUsingIndex
impl RefUnwindSafe for ConstraintUsingIndex
impl Send for ConstraintUsingIndex
impl Sync for ConstraintUsingIndex
impl Unpin for ConstraintUsingIndex
impl UnsafeUnpin for ConstraintUsingIndex
impl UnwindSafe for ConstraintUsingIndex
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