Skip to main content

SchemaCatalog

Struct SchemaCatalog 

Source
pub struct SchemaCatalog { /* private fields */ }
Expand description

Schema constraints and type definitions.

Implementations§

Source§

impl SchemaCatalog

Source

pub fn register_node_type( &self, def: NodeTypeDefinition, ) -> Result<(), CatalogError>

Registers a new node type definition.

Source

pub fn register_or_replace_node_type(&self, def: NodeTypeDefinition)

Registers or replaces a node type definition.

Source

pub fn drop_node_type(&self, name: &str) -> Result<(), CatalogError>

Drops a node type definition by name.

Source

pub fn get_node_type(&self, name: &str) -> Option<NodeTypeDefinition>

Gets a node type definition by name.

Source

pub fn resolved_node_type(&self, name: &str) -> Option<NodeTypeDefinition>

Gets a resolved node type with inherited properties and constraints from parents.

Walks the parent chain depth-first, collecting properties and constraints. Detects cycles via a visited set. Child properties override parent ones with the same name.

Source

pub fn all_node_types(&self) -> Vec<String>

Returns all registered node type names.

Source

pub fn all_node_type_defs(&self) -> Vec<NodeTypeDefinition>

Returns all registered node type definitions.

Source

pub fn register_edge_type( &self, def: EdgeTypeDefinition, ) -> Result<(), CatalogError>

Registers a new edge type definition.

Source

pub fn register_or_replace_edge_type(&self, def: EdgeTypeDefinition)

Registers or replaces an edge type definition.

Source

pub fn drop_edge_type(&self, name: &str) -> Result<(), CatalogError>

Drops an edge type definition by name.

Source

pub fn get_edge_type(&self, name: &str) -> Option<EdgeTypeDefinition>

Gets an edge type definition by name.

Source

pub fn all_edge_types(&self) -> Vec<String>

Returns all registered edge type names.

Source

pub fn all_edge_type_defs(&self) -> Vec<EdgeTypeDefinition>

Returns all registered edge type definitions.

Source

pub fn register_graph_type( &self, def: GraphTypeDefinition, ) -> Result<(), CatalogError>

Registers a new graph type definition.

Source

pub fn drop_graph_type(&self, name: &str) -> Result<(), CatalogError>

Drops a graph type definition by name.

Source

pub fn get_graph_type(&self, name: &str) -> Option<GraphTypeDefinition>

Gets a graph type definition by name.

Source

pub fn all_graph_types(&self) -> Vec<String>

Returns all registered graph type names.

Source

pub fn all_graph_type_defs(&self) -> Vec<GraphTypeDefinition>

Returns all registered graph type definitions.

Source

pub fn register_schema(&self, name: String) -> Result<(), CatalogError>

Registers a schema namespace.

Source

pub fn drop_schema(&self, name: &str) -> Result<(), CatalogError>

Drops a schema namespace.

Source

pub fn schema_exists(&self, name: &str) -> bool

Checks whether a schema namespace exists.

Source

pub fn schema_names(&self) -> Vec<String>

Returns all registered schema namespace names.

Source

pub fn add_constraint_to_type( &self, label: &str, constraint: TypeConstraint, ) -> Result<(), CatalogError>

Adds a constraint to an existing node type, creating a minimal type if needed.

Source

pub fn alter_node_type_add_property( &self, type_name: &str, property: TypedProperty, ) -> Result<(), CatalogError>

Adds a property to an existing node type.

Source

pub fn alter_node_type_drop_property( &self, type_name: &str, property_name: &str, ) -> Result<(), CatalogError>

Drops a property from an existing node type.

Source

pub fn alter_edge_type_add_property( &self, type_name: &str, property: TypedProperty, ) -> Result<(), CatalogError>

Adds a property to an existing edge type.

Source

pub fn alter_edge_type_drop_property( &self, type_name: &str, property_name: &str, ) -> Result<(), CatalogError>

Drops a property from an existing edge type.

Source

pub fn alter_graph_type_add_node_type( &self, graph_type_name: &str, node_type: String, ) -> Result<(), CatalogError>

Adds a node type to a graph type.

Source

pub fn alter_graph_type_drop_node_type( &self, graph_type_name: &str, node_type: &str, ) -> Result<(), CatalogError>

Drops a node type from a graph type.

Source

pub fn alter_graph_type_add_edge_type( &self, graph_type_name: &str, edge_type: String, ) -> Result<(), CatalogError>

Adds an edge type to a graph type.

Source

pub fn alter_graph_type_drop_edge_type( &self, graph_type_name: &str, edge_type: &str, ) -> Result<(), CatalogError>

Drops an edge type from a graph type.

Source

pub fn register_procedure( &self, def: ProcedureDefinition, ) -> Result<(), CatalogError>

Registers a stored procedure.

Source

pub fn replace_procedure(&self, def: ProcedureDefinition)

Replaces or creates a stored procedure.

Source

pub fn drop_procedure(&self, name: &str) -> Result<(), CatalogError>

Drops a stored procedure.

Source

pub fn get_procedure(&self, name: &str) -> Option<ProcedureDefinition>

Gets a stored procedure by name.

Source

pub fn all_procedure_defs(&self) -> Vec<ProcedureDefinition>

Returns all registered procedure definitions.

Source

pub fn all_graph_type_bindings(&self) -> Vec<(String, String)>

Returns all graph type bindings (graph_name, type_name).

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more