pub struct IndexContract {
pub name: Option<String>,
pub columns: Vec<IndexColumn>,
pub unique: bool,
pub using: Option<String>,
pub where_clause: Option<String>,
pub with: BTreeMap<String, String>,
}Expand description
A declarative index. Mirrors what Prisma/Drizzle let you declare for
PostgreSQL. where/expr/ops are SQL fragments (bounded, not full
statements); name is auto-derived when omitted.
Fields§
§name: Option<String>§columns: Vec<IndexColumn>§unique: bool§using: Option<String>Index method: btree (default) | hash | gist | gin | spgist | brin.
where_clause: Option<String>Partial-index predicate (the WHERE ... clause).
with: BTreeMap<String, String>Storage parameters, e.g. {“fillfactor”:“70”}.
Trait Implementations§
Source§impl Clone for IndexContract
impl Clone for IndexContract
Source§fn clone(&self) -> IndexContract
fn clone(&self) -> IndexContract
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexContract
impl Debug for IndexContract
Source§impl<'de> Deserialize<'de> for IndexContract
impl<'de> Deserialize<'de> for IndexContract
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IndexContract
impl RefUnwindSafe for IndexContract
impl Send for IndexContract
impl Sync for IndexContract
impl Unpin for IndexContract
impl UnsafeUnpin for IndexContract
impl UnwindSafe for IndexContract
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