pub struct GraphDB { /* private fields */ }Expand description
Main GraphDB class for browser usage
Implementations§
Source§impl GraphDB
impl GraphDB
Sourcepub fn new(metric: Option<String>) -> Result<GraphDB, JsValue>
pub fn new(metric: Option<String>) -> Result<GraphDB, JsValue>
Create a new GraphDB instance
§Arguments
metric- Distance metric for hypergraph embeddings (“euclidean”, “cosine”, “dotproduct”, “manhattan”)
Sourcepub fn create_node(
&self,
labels: Vec<String>,
properties: JsValue,
) -> Result<String, JsValue>
pub fn create_node( &self, labels: Vec<String>, properties: JsValue, ) -> Result<String, JsValue>
Sourcepub fn create_edge(
&self,
from: String,
to: String,
edge_type: String,
properties: JsValue,
) -> Result<String, JsValue>
pub fn create_edge( &self, from: String, to: String, edge_type: String, properties: JsValue, ) -> Result<String, JsValue>
Sourcepub fn create_hyperedge(
&self,
nodes: Vec<String>,
description: String,
embedding: Option<Vec<f32>>,
confidence: Option<f32>,
) -> Result<String, JsValue>
pub fn create_hyperedge( &self, nodes: Vec<String>, description: String, embedding: Option<Vec<f32>>, confidence: Option<f32>, ) -> Result<String, JsValue>
Sourcepub fn get_hyperedge(&self, id: String) -> Option<JsHyperedge>
pub fn get_hyperedge(&self, id: String) -> Option<JsHyperedge>
Get a hyperedge by ID
Sourcepub fn delete_node(&self, id: String) -> bool
pub fn delete_node(&self, id: String) -> bool
Sourcepub fn delete_edge(&self, id: String) -> bool
pub fn delete_edge(&self, id: String) -> bool
Delete an edge by ID
Sourcepub fn export_cypher(&self) -> String
pub fn export_cypher(&self) -> String
Trait Implementations§
Source§impl FromWasmAbi for GraphDB
impl FromWasmAbi for GraphDB
Source§impl IntoWasmAbi for GraphDB
impl IntoWasmAbi for GraphDB
Source§impl LongRefFromWasmAbi for GraphDB
impl LongRefFromWasmAbi for GraphDB
Source§impl OptionFromWasmAbi for GraphDB
impl OptionFromWasmAbi for GraphDB
Source§impl OptionIntoWasmAbi for GraphDB
impl OptionIntoWasmAbi for GraphDB
Source§impl RefFromWasmAbi for GraphDB
impl RefFromWasmAbi for GraphDB
Source§impl RefMutFromWasmAbi for GraphDB
impl RefMutFromWasmAbi for GraphDB
Source§impl TryFromJsValue for GraphDB
impl TryFromJsValue for GraphDB
Source§impl VectorFromWasmAbi for GraphDB
impl VectorFromWasmAbi for GraphDB
Source§impl VectorIntoWasmAbi for GraphDB
impl VectorIntoWasmAbi for GraphDB
impl SupportsConstructor for GraphDB
impl SupportsInstanceProperty for GraphDB
impl SupportsStaticProperty for GraphDB
Auto Trait Implementations§
impl Freeze for GraphDB
impl !RefUnwindSafe for GraphDB
impl Send for GraphDB
impl Sync for GraphDB
impl Unpin for GraphDB
impl !UnwindSafe for GraphDB
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.