pub struct CreateIndex {Show 15 fields
pub name: Option<ObjectName>,
pub table_name: ObjectName,
pub using: Option<IndexType>,
pub columns: Vec<IndexColumn>,
pub unique: bool,
pub concurrently: bool,
pub async: bool,
pub if_not_exists: bool,
pub include: Vec<Ident>,
pub nulls_distinct: Option<bool>,
pub with: Vec<Expr>,
pub predicate: Option<Expr>,
pub index_options: Vec<IndexOption>,
pub alter_options: Vec<AlterTableOperation>,
pub fulltext_or_spatial: Option<FullTextOrSpatialKind>,
}Expand description
CREATE INDEX statement.
Fields§
§name: Option<ObjectName>index name
table_name: ObjectNametable name
using: Option<IndexType>Index type used in the statement. Can also be found inside CreateIndex::index_options
depending on the position of the option within the statement.
columns: Vec<IndexColumn>columns included in the index
unique: boolwhether the index is unique
concurrently: boolwhether the index is created concurrently
async: boolwhether the index is created asynchronously (DSQL).
if_not_exists: boolIF NOT EXISTS clause
include: Vec<Ident>INCLUDE clause: https://www.postgresql.org/docs/current/sql-createindex.html
nulls_distinct: Option<bool>NULLS DISTINCT / NOT DISTINCT clause: https://www.postgresql.org/docs/current/sql-createindex.html
with: Vec<Expr>§predicate: Option<Expr>§index_options: Vec<IndexOption>Index options: https://www.postgresql.org/docs/current/sql-createindex.html
alter_options: Vec<AlterTableOperation>MySQL allows a subset of options normally used for ALTER TABLE:
ALGORITHMLOCK
fulltext_or_spatial: Option<FullTextOrSpatialKind>MySQL: when this index is a standalone CREATE FULLTEXT INDEX or
CREATE SPATIAL INDEX, records which kind. None means a plain
CREATE INDEX (or CREATE UNIQUE INDEX when unique is true).
Trait Implementations§
Source§impl Clone for CreateIndex
impl Clone for CreateIndex
Source§fn clone(&self) -> CreateIndex
fn clone(&self) -> CreateIndex
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 CreateIndex
impl Debug for CreateIndex
Source§impl<'de> Deserialize<'de> for CreateIndex
impl<'de> Deserialize<'de> for CreateIndex
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>,
Source§impl Display for CreateIndex
impl Display for CreateIndex
impl Eq for CreateIndex
Source§impl From<CreateIndex> for Statement
impl From<CreateIndex> for Statement
Source§fn from(c: CreateIndex) -> Self
fn from(c: CreateIndex) -> Self
Source§impl Hash for CreateIndex
impl Hash for CreateIndex
Source§impl Ord for CreateIndex
impl Ord for CreateIndex
Source§fn cmp(&self, other: &CreateIndex) -> Ordering
fn cmp(&self, other: &CreateIndex) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for CreateIndex
impl PartialEq for CreateIndex
Source§fn eq(&self, other: &CreateIndex) -> bool
fn eq(&self, other: &CreateIndex) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for CreateIndex
impl PartialOrd for CreateIndex
Source§impl Serialize for CreateIndex
impl Serialize for CreateIndex
Source§impl Spanned for CreateIndex
impl Spanned for CreateIndex
impl StructuralPartialEq for CreateIndex
Source§impl Visit for CreateIndex
impl Visit for CreateIndex
Source§impl VisitMut for CreateIndex
impl VisitMut for CreateIndex
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>
VisitorMut. Read more