pub struct GraphCatalog { /* private fields */ }Expand description
DataFusion CatalogProvider for a GraphForge project directory.
Exposes topology, edge, and property tables under the "graph" schema.
Construct via GraphCatalog::open.
Implementations§
Source§impl GraphCatalog
impl GraphCatalog
Sourcepub fn open(
dir: &Path,
ontology: Option<&OntologyHandle>,
runtime_catalog: &RuntimeCatalog,
) -> Result<Self, DataFusionError>
pub fn open( dir: &Path, ontology: Option<&OntologyHandle>, runtime_catalog: &RuntimeCatalog, ) -> Result<Self, DataFusionError>
Open a GraphForge project directory as a DataFusion catalog.
dir: project root (containstopology/,properties/, etc.)ontology: compiled ontology, orNonein exploratory moderuntime_catalog: runtime type catalog for exploratory mode
§Errors
Propagates I/O errors encountered while registering tables.
Sourcepub fn prop_names(&self) -> &HashMap<u32, String>
pub fn prop_names(&self) -> &HashMap<u32, String>
Reverse map PropId.0 → property name (ontology + runtime catalog),
used by the relational lowering layer to resolve PropertyAccess.
Sourcepub fn rel_names(&self) -> &HashMap<u32, String>
pub fn rel_names(&self) -> &HashMap<u32, String>
Reverse map RuntimeTypeId.0 → relation-type name from the runtime
catalog. The relational lowerer tags these keys before merging them with
ontology TypeIds so the two zero-based ID spaces cannot collide.
Sourcepub fn label_names(&self) -> &HashMap<u32, String>
pub fn label_names(&self) -> &HashMap<u32, String>
Reverse map TypeId.0 → entity-type (node label) name, from the runtime
catalog. Used by the relational lowering layer to render a node value’s
label for an unlabelled match — including in exploratory mode, where the
ontology map is empty (#889).
Trait Implementations§
Source§impl CatalogProvider for GraphCatalog
impl CatalogProvider for GraphCatalog
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Any
so that it can be downcast to a specific implementation.Source§fn schema_names(&self) -> Vec<String>
fn schema_names(&self) -> Vec<String>
Source§fn schema(&self, name: &str) -> Option<Arc<dyn SchemaProvider>>
fn schema(&self, name: &str) -> Option<Arc<dyn SchemaProvider>>
Source§fn register_schema(
&self,
name: &str,
schema: Arc<dyn SchemaProvider>,
) -> Result<Option<Arc<dyn SchemaProvider>>, DataFusionError>
fn register_schema( &self, name: &str, schema: Arc<dyn SchemaProvider>, ) -> Result<Option<Arc<dyn SchemaProvider>>, DataFusionError>
Source§fn deregister_schema(
&self,
_name: &str,
_cascade: bool,
) -> Result<Option<Arc<dyn SchemaProvider>>, DataFusionError>
fn deregister_schema( &self, _name: &str, _cascade: bool, ) -> Result<Option<Arc<dyn SchemaProvider>>, DataFusionError>
MemoryCatalogProvider, a non-empty schema
will only be successfully dropped when cascade is true.
This is equivalent to how DROP SCHEMA works in PostgreSQL. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for GraphCatalog
impl !UnwindSafe for GraphCatalog
impl Freeze for GraphCatalog
impl Send for GraphCatalog
impl Sync for GraphCatalog
impl Unpin for GraphCatalog
impl UnsafeUnpin for GraphCatalog
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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