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§
Implementations§
Source§impl IndexKindSpec
impl IndexKindSpec
Sourcepub const ALL: [IndexKindSpec; 6]
pub const ALL: [IndexKindSpec; 6]
Every variant; derived inverses (and their tests) iterate this so the variant list is maintained in exactly one place.
Sourcepub fn display_name(&self) -> &'static str
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.
Sourcepub fn from_display_name(name: &str) -> Option<Self>
pub fn from_display_name(name: &str) -> Option<Self>
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.
Sourcepub fn provider_name(&self) -> &'static str
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.
Sourcepub fn default_config(&self) -> Option<fn(&mut BTreeMap<String, Value>)>
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.
Sourcepub fn is_lookup(&self) -> bool
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!.
Sourcepub fn resolve(detail: Option<&IndexDetailSpec>, legacy_property: &str) -> Self
pub fn resolve(detail: Option<&IndexDetailSpec>, legacy_property: &str) -> Self
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
impl Clone for IndexKindSpec
impl Copy for IndexKindSpec
Source§impl Debug for IndexKindSpec
impl Debug for IndexKindSpec
Source§impl<'de> Deserialize<'de> for IndexKindSpec
impl<'de> Deserialize<'de> for IndexKindSpec
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>,
impl Eq for IndexKindSpec
Source§impl From<IndexKind> for IndexKindSpec
impl From<IndexKind> for IndexKindSpec
Source§impl From<IndexKindSpec> for IndexKind
impl From<IndexKindSpec> for IndexKind
Source§fn from(kind: IndexKindSpec) -> Self
fn from(kind: IndexKindSpec) -> Self
Source§impl PartialEq for IndexKindSpec
impl PartialEq for IndexKindSpec
Source§impl Serialize for IndexKindSpec
impl Serialize for IndexKindSpec
impl StructuralPartialEq for IndexKindSpec
Auto Trait Implementations§
impl Forget for IndexKindSpec
impl Freeze for IndexKindSpec
impl Move for IndexKindSpec
impl RefUnwindSafe for IndexKindSpec
impl Send for IndexKindSpec
impl Sync for IndexKindSpec
impl Unpin for IndexKindSpec
impl UnsafeUnpin for IndexKindSpec
impl UnwindSafe for IndexKindSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.