pub struct ApplicationSourceHandle { /* private fields */ }Expand description
Handle for programmatic event injection into an Application Source
ApplicationSourceHandle provides a type-safe API for injecting graph data changes
(node inserts, updates, deletes, and relationship inserts) directly from your application
code into the Drasi continuous query processing pipeline.
Implementations§
Source§impl ApplicationSourceHandle
impl ApplicationSourceHandle
Sourcepub async fn send(&self, change: SourceChange) -> Result<()>
pub async fn send(&self, change: SourceChange) -> Result<()>
Send a raw source change event
Sourcepub async fn send_node_insert(
&self,
element_id: impl Into<Arc<str>>,
labels: Vec<impl Into<Arc<str>>>,
properties: ElementPropertyMap,
) -> Result<()>
pub async fn send_node_insert( &self, element_id: impl Into<Arc<str>>, labels: Vec<impl Into<Arc<str>>>, properties: ElementPropertyMap, ) -> Result<()>
Insert a new node into the graph
Sourcepub async fn send_node_update(
&self,
element_id: impl Into<Arc<str>>,
labels: Vec<impl Into<Arc<str>>>,
properties: ElementPropertyMap,
) -> Result<()>
pub async fn send_node_update( &self, element_id: impl Into<Arc<str>>, labels: Vec<impl Into<Arc<str>>>, properties: ElementPropertyMap, ) -> Result<()>
Update an existing node in the graph
Sourcepub async fn send_delete(
&self,
element_id: impl Into<Arc<str>>,
labels: Vec<impl Into<Arc<str>>>,
) -> Result<()>
pub async fn send_delete( &self, element_id: impl Into<Arc<str>>, labels: Vec<impl Into<Arc<str>>>, ) -> Result<()>
Delete a node or relationship from the graph
Sourcepub async fn send_relation_insert(
&self,
element_id: impl Into<Arc<str>>,
labels: Vec<impl Into<Arc<str>>>,
properties: ElementPropertyMap,
start_node_id: impl Into<Arc<str>>,
end_node_id: impl Into<Arc<str>>,
) -> Result<()>
pub async fn send_relation_insert( &self, element_id: impl Into<Arc<str>>, labels: Vec<impl Into<Arc<str>>>, properties: ElementPropertyMap, start_node_id: impl Into<Arc<str>>, end_node_id: impl Into<Arc<str>>, ) -> Result<()>
Insert a new relationship into the graph
Sourcepub async fn send_batch(&self, changes: Vec<SourceChange>) -> Result<()>
pub async fn send_batch(&self, changes: Vec<SourceChange>) -> Result<()>
Send a batch of source changes efficiently
Trait Implementations§
Source§impl Clone for ApplicationSourceHandle
impl Clone for ApplicationSourceHandle
Source§fn clone(&self) -> ApplicationSourceHandle
fn clone(&self) -> ApplicationSourceHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ApplicationSourceHandle
impl RefUnwindSafe for ApplicationSourceHandle
impl Send for ApplicationSourceHandle
impl Sync for ApplicationSourceHandle
impl Unpin for ApplicationSourceHandle
impl UnsafeUnpin for ApplicationSourceHandle
impl UnwindSafe for ApplicationSourceHandle
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