pub struct VectorGraphDB { /* private fields */ }Expand description
向量图数据库
Implementations§
Source§impl VectorGraphDB
impl VectorGraphDB
Sourcepub async fn insert_vector(&self, vector: &Vector) -> Result<()>
pub async fn insert_vector(&self, vector: &Vector) -> Result<()>
插入向量
Sourcepub async fn query_vectors(
&self,
request: &VectorQueryRequest,
) -> Result<Vec<VectorQueryResult>>
pub async fn query_vectors( &self, request: &VectorQueryRequest, ) -> Result<Vec<VectorQueryResult>>
查询向量
Sourcepub async fn insert_node(&self, node: &GraphNode) -> Result<()>
pub async fn insert_node(&self, node: &GraphNode) -> Result<()>
插入图节点
Sourcepub async fn insert_edge(&self, edge: &GraphEdge) -> Result<()>
pub async fn insert_edge(&self, edge: &GraphEdge) -> Result<()>
插入图边
Sourcepub async fn query_graph(
&self,
request: &GraphQueryRequest,
) -> Result<GraphQueryResult>
pub async fn query_graph( &self, request: &GraphQueryRequest, ) -> Result<GraphQueryResult>
查询图
Sourcepub async fn update_vector(&self, vector: &Vector) -> Result<()>
pub async fn update_vector(&self, vector: &Vector) -> Result<()>
更新向量
Sourcepub async fn update_node(&self, node: &GraphNode) -> Result<()>
pub async fn update_node(&self, node: &GraphNode) -> Result<()>
更新节点
Sourcepub async fn get_vector(&self, vector_id: &str) -> Result<Vector>
pub async fn get_vector(&self, vector_id: &str) -> Result<Vector>
获取向量
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
清除缓存
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for VectorGraphDB
impl !UnwindSafe for VectorGraphDB
impl Freeze for VectorGraphDB
impl Send for VectorGraphDB
impl Sync for VectorGraphDB
impl Unpin for VectorGraphDB
impl UnsafeUnpin for VectorGraphDB
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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> 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> ⓘ
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 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> ⓘ
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