pub struct IndexConstraint {
pub display_as_key: bool,
pub name: Option<Ident>,
pub index_type: Option<IndexType>,
pub columns: Vec<IndexColumn>,
pub index_options: Vec<IndexOption>,
}Expand description
MySQLs index definition for index creation. Not present on ANSI so, for now, the usage is restricted to MySQL, as no other dialects that support this syntax were found.
{INDEX | KEY} [index_name] [index_type] (key_part,...) [index_option]...
Fields§
§display_as_key: boolWhether this index starts with KEY (true) or INDEX (false), to maintain the same syntax.
name: Option<Ident>Index name.
index_type: Option<IndexType>Optional index type.
columns: Vec<IndexColumn>Referred column identifier list.
index_options: Vec<IndexOption>Optional index options such as USING; see IndexOption.
Trait Implementations§
Source§impl Clone for IndexConstraint
impl Clone for IndexConstraint
Source§fn clone(&self) -> IndexConstraint
fn clone(&self) -> IndexConstraint
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 IndexConstraint
impl Debug for IndexConstraint
Source§impl<'de> Deserialize<'de> for IndexConstraint
impl<'de> Deserialize<'de> for IndexConstraint
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 Display for IndexConstraint
impl Display for IndexConstraint
Source§impl From<IndexConstraint> for TableConstraint
impl From<IndexConstraint> for TableConstraint
Source§fn from(constraint: IndexConstraint) -> Self
fn from(constraint: IndexConstraint) -> Self
Converts to this type from the input type.
Source§impl Hash for IndexConstraint
impl Hash for IndexConstraint
Source§impl Ord for IndexConstraint
impl Ord for IndexConstraint
Source§fn cmp(&self, other: &IndexConstraint) -> Ordering
fn cmp(&self, other: &IndexConstraint) -> 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 IndexConstraint
impl PartialEq for IndexConstraint
Source§impl PartialOrd for IndexConstraint
impl PartialOrd for IndexConstraint
Source§impl Serialize for IndexConstraint
impl Serialize for IndexConstraint
Source§impl Spanned for IndexConstraint
impl Spanned for IndexConstraint
Source§impl Visit for IndexConstraint
impl Visit for IndexConstraint
Source§impl VisitMut for IndexConstraint
impl VisitMut for IndexConstraint
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
impl Eq for IndexConstraint
impl StructuralPartialEq for IndexConstraint
Auto Trait Implementations§
impl Freeze for IndexConstraint
impl RefUnwindSafe for IndexConstraint
impl Send for IndexConstraint
impl Sync for IndexConstraint
impl Unpin for IndexConstraint
impl UnwindSafe for IndexConstraint
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