Skip to main content

IndexKindSpec

Enum IndexKindSpec 

Source
pub enum IndexKindSpec {
    Range,
    Point,
    Text,
    Fulltext,
    Lookup,
    Vector,
}
Expand description

The DDL index kind carried by IndexDetailSpec: a serde-serializable mirror of relate_parser::IndexKind.

Variants§

§

Range

§

Point

§

Text

§

Fulltext

§

Lookup

§

Vector

Implementations§

Source§

impl IndexKindSpec

Source

pub const ALL: [IndexKindSpec; 6]

Every variant; derived inverses (and their tests) iterate this so the variant list is maintained in exactly one place.

Source

pub fn display_name(&self) -> &'static str

The upper-case display name Neo4j’s SHOW INDEXES type column uses (same strings as relate_parser::IndexKind::display_name). The SHOW INDEXES type column spelling — the parser’s own display name, so the six names live once in the crate that owns the dialect.

Source

pub fn from_display_name(name: &str) -> Option<IndexKindSpec>

Parse the display name back into the kind — the inverse of IndexKindSpec::display_name, used to recover the kind of legacy catalog rows that predate CatalogIndexDetail from their {props}#{KIND}#{name} property encoding. Derived from the one string table in display_name so the two directions cannot drift.

Source

pub fn provider_name(&self) -> &'static str

The Neo4j SHOW INDEXES indexProvider column value for this kind. Exhaustive on purpose: a new index kind fails to compile here instead of silently falling back to range-1.0.

Source

pub fn default_config(&self) -> Option<fn(&mut BTreeMap<String, Value>)>

The DDL default indexConfig this kind records when the statement names none — the one mutator the DDL layer applies. None for the kinds whose default config is the empty map: RANGE, TEXT and LOOKUP record none, and VECTOR’s metric-dependent defaults are applied by vector_config::apply_defaults through the vector OPTIONS pipeline (catalog_schema::create_config), which is why this table omits it. The table lives beside IndexKindSpec::display_name and IndexKindSpec::provider_name so a new kind states its default here, never in a _-glued match one layer above.

Source

pub fn is_lookup(&self) -> bool

The one LOOKUP discrimination: a LOOKUP index carries no label/property tokens. Every LOOKUP reader — the row’s null-ed labelsOrTypes/properties cells, the createStatement’s EACH form, the notification descriptor’s tail — asks this, never its own matches!.

Source

pub fn resolve( detail: Option<&IndexDetailSpec>, legacy_property: &str, ) -> IndexKindSpec

The kind of one index row, resolved once — the detail’s kind when the detail join hits, else the legacy {props}#{KIND}#{name} encoding’s kind for a detail-less legacy WAL/checkpoint row (catalog_create_index writes both redo ops in one statement today), else RANGE. The one resolution every kind reader consults — the kind filter, the row’s type/provider columns and LOOKUP nulling, the createStatement’s own detail.kind, and the planner-IR diagnostic table’s type cell. The RANGE default covers exactly the encoding’s two no-kind shapes: the bare pre-encoding form (name, written before kinds existed — RANGE by history, the only kind that era stored) and an unparseable kind segment (name#NOTAKIND#idx, pinned to no kind by the redo decoder’s own tests). The second cannot occur in a store this engine wrote — legacy_property_encoding only ever embeds a valid IndexKindSpec — so the default never fabricates a kind over a reachable row.

Trait Implementations§

Source§

impl Clone for IndexKindSpec

Source§

fn clone(&self) -> IndexKindSpec

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for IndexKindSpec

Source§

impl Debug for IndexKindSpec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for IndexKindSpec

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<IndexKindSpec, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for IndexKindSpec

Source§

impl From<IndexKind> for IndexKindSpec

Source§

fn from(kind: IndexKind) -> IndexKindSpec

Converts to this type from the input type.
Source§

impl PartialEq for IndexKindSpec

Source§

fn eq(&self, other: &IndexKindSpec) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for IndexKindSpec

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for IndexKindSpec

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V