pub struct Index {
pub table: Cow<'static, str>,
pub name: Cow<'static, str>,
pub columns: Vec<IndexColumn>,
pub is_unique: bool,
pub where_clause: Option<Cow<'static, str>>,
pub origin: IndexOrigin,
}Expand description
Runtime index entity for serde serialization
Fields§
§table: Cow<'static, str>Parent table name
name: Cow<'static, str>Index name
columns: Vec<IndexColumn>Columns included in the index
is_unique: boolIs this a unique index?
where_clause: Option<Cow<'static, str>>WHERE clause for partial indexes
origin: IndexOriginHow the index was created
Implementations§
Source§impl Index
impl Index
Source§impl Index
impl Index
Sourcepub fn create_index_sql(&self) -> String
pub fn create_index_sql(&self) -> String
Generate CREATE INDEX SQL
Sourcepub fn drop_index_sql(&self) -> String
pub fn drop_index_sql(&self) -> String
Generate DROP INDEX SQL
Trait Implementations§
impl Eq for Index
impl StructuralPartialEq for Index
Auto Trait Implementations§
impl Freeze for Index
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnwindSafe for Index
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