pub struct IndexInfo {
pub name: String,
pub unique: bool,
pub keys: Vec<String>,
}Expand description
One index on a relation, with its key list in declared order (#1307).
Order is the whole point: an index on (status, pk_invoice) serves
ORDER BY status, pk_invoice without a sort, while separate indexes on
status and on pk_invoice leave an incremental sort on every page. The flat
column set get_indexed_columns returns cannot tell those two apart — it
reports {pk_invoice, status} for both, which is why #1307 could not be built
on it.
Fields§
§name: StringThe index’s own relation name.
unique: boolWhether the index is unique.
keys: Vec<String>Key definitions in declared order. A key is a bare column name (status)
or an expression as Postgres renders it ((data ->> 'id'::text)), so an
expression index is visible rather than silently dropped.
Trait Implementations§
impl Eq for IndexInfo
impl StructuralPartialEq for IndexInfo
Auto Trait Implementations§
impl Freeze for IndexInfo
impl RefUnwindSafe for IndexInfo
impl Send for IndexInfo
impl Sync for IndexInfo
impl Unpin for IndexInfo
impl UnsafeUnpin for IndexInfo
impl UnwindSafe for IndexInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.