pub struct Index { /* private fields */ }Expand description
Index
Implementations§
Source§impl Index
impl Index
Sourcepub const fn new(fields: &'static [&'static str], unique: bool) -> Self
pub const fn new(fields: &'static [&'static str], unique: bool) -> Self
Build one index declaration from field-list and uniqueness metadata.
Sourcepub const fn new_with_predicate(
fields: &'static [&'static str],
unique: bool,
predicate: Option<&'static str>,
) -> Self
pub const fn new_with_predicate( fields: &'static [&'static str], unique: bool, predicate: Option<&'static str>, ) -> Self
Build one index declaration with optional conditional predicate metadata.
Sourcepub const fn new_with_key_items(
fields: &'static [&'static str],
key_items: &'static [IndexKeyItem],
unique: bool,
) -> Self
pub const fn new_with_key_items( fields: &'static [&'static str], key_items: &'static [IndexKeyItem], unique: bool, ) -> Self
Build one index declaration with explicit canonical key-item metadata.
Sourcepub const fn new_with_key_items_and_predicate(
fields: &'static [&'static str],
key_items: Option<&'static [IndexKeyItem]>,
unique: bool,
predicate: Option<&'static str>,
) -> Self
pub const fn new_with_key_items_and_predicate( fields: &'static [&'static str], key_items: Option<&'static [IndexKeyItem]>, unique: bool, predicate: Option<&'static str>, ) -> Self
Build one index declaration with explicit key items + predicate metadata.
Sourcepub const fn key_items(&self) -> IndexKeyItemsRef
pub const fn key_items(&self) -> IndexKeyItemsRef
Borrow canonical key-item metadata for this index.
Sourcepub const fn has_expression_key_items(&self) -> bool
pub const fn has_expression_key_items(&self) -> bool
Return whether this index includes expression key items.
Sourcepub const fn predicate(&self) -> Option<&'static str>
pub const fn predicate(&self) -> Option<&'static str>
Return optional conditional-index predicate SQL metadata.
This text is input-only; runtime/planner semantics must consume the canonical lowered predicate form.
pub fn is_prefix_of(&self, other: &Self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Index
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnsafeUnpin 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