pub struct Index {
pub schema: Cow<'static, str>,
pub table: Cow<'static, str>,
pub name: Cow<'static, str>,
pub name_explicit: bool,
pub columns: Vec<IndexColumn>,
pub is_unique: bool,
pub where_clause: Option<Cow<'static, str>>,
pub method: Option<Cow<'static, str>>,
pub with: Option<Cow<'static, str>>,
pub concurrently: bool,
}Expand description
Runtime index entity for serde serialization
Fields§
§schema: Cow<'static, str>Schema name
table: Cow<'static, str>Parent table name
name: Cow<'static, str>Index name
name_explicit: boolWhether the index name was explicitly specified
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
method: Option<Cow<'static, str>>Index method (btree, hash, etc.)
with: Option<Cow<'static, str>>Storage parameters (WITH clause)
concurrently: boolCreate concurrently?
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