Skip to main content

CreateIndexSpec

Struct CreateIndexSpec 

Source
pub struct CreateIndexSpec<'a> {
    pub unique: Uniqueness,
    pub if_not_exists: IfNotExists,
    pub database: Option<NameId>,
    pub name: NameId,
    pub table: NameId,
    pub using: Option<NameId>,
    pub columns: &'a [IndexedColumn],
    pub settings: &'a [Vec<u8>],
    pub filter: Option<ExprId>,
}
Expand description

Everything a CREATE INDEX statement names.

The grammar’s own fields, gathered rather than passed as nine positional arguments of which two were adjacent booleans.

Fields§

§unique: Uniqueness

Whether the index refuses a repeated key.

§if_not_exists: IfNotExists

What to do when the index is already there.

§database: Option<NameId>

The schema the index is created in, when one was written.

§name: NameId

The index’s name.

§table: NameId

The table it is over.

§using: Option<NameId>

The module named by USING, for the extension index forms.

§columns: &'a [IndexedColumn]

The indexed columns, in key order.

§settings: &'a [Vec<u8>]

The WITH settings, as written.

§filter: Option<ExprId>

The WHERE of a partial index, as an expression of the statement.

Auto Trait Implementations§

§

impl<'a> Freeze for CreateIndexSpec<'a>

§

impl<'a> RefUnwindSafe for CreateIndexSpec<'a>

§

impl<'a> Send for CreateIndexSpec<'a>

§

impl<'a> Sync for CreateIndexSpec<'a>

§

impl<'a> Unpin for CreateIndexSpec<'a>

§

impl<'a> UnsafeUnpin for CreateIndexSpec<'a>

§

impl<'a> UnwindSafe for CreateIndexSpec<'a>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.