pub type IndexWalker<'a> = Walker<'a, IndexId>;
Expand description

Traverse an index.

Aliased Type§

struct IndexWalker<'a> {
    pub id: IndexId,
    pub schema: &'a SqlSchema,
}

Fields§

§id: IndexId

The identifier.

§schema: &'a SqlSchema

The schema for which the identifier is valid.

Implementations§

source§

impl<'a> IndexWalker<'a>

source

pub fn column_names(self) -> impl ExactSizeIterator<Item = &'a str>

The names of the indexed columns.

source

pub fn columns(self) -> impl ExactSizeIterator<Item = IndexColumnWalker<'a>>

Traverse the indexed columns.

source

pub fn contains_column(self, column_id: TableColumnId) -> bool

True if index contains the given column.

source

pub fn index_type(self) -> IndexType

The IndexType

source

pub fn is_primary_key(self) -> bool

Is this index the primary key of the table?

source

pub fn is_unique(self) -> bool

Is this index a unique constraint? NB: This will return false for the primary key.

source

pub fn name(self) -> &'a str

The name of the index.

source

pub fn table(self) -> TableWalker<'a>

Traverse to the table of the index.