Skip to main content

SQLIndexInfo

Trait SQLIndexInfo 

Source
pub trait SQLIndexInfo:
    Any
    + Send
    + Sync {
    // Required methods
    fn table(&self) -> &'static TableRef;
    fn name(&self) -> &'static str;
    fn columns(&self) -> &'static [&'static str];

    // Provided methods
    fn is_unique(&self) -> bool { ... }
    fn where_clause(&self) -> Option<&'static str> { ... }
}

Required Methods§

Source

fn table(&self) -> &'static TableRef

Source

fn name(&self) -> &'static str

The name of this index (for DROP INDEX statements)

Source

fn columns(&self) -> &'static [&'static str]

Column names included in this index, in definition order.

Provided Methods§

Source

fn is_unique(&self) -> bool

Whether this is a unique index

Source

fn where_clause(&self) -> Option<&'static str>

Raw SQL predicate for a partial index.

Trait Implementations§

Source§

impl Debug for dyn SQLIndexInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: DrizzleIndex> SQLIndexInfo for T

Blanket: any DrizzleIndex automatically satisfies SQLIndexInfo.