use std::sync::Arc;
use uni_common::Properties;
use uni_common::Result;
use uni_common::core::id::Vid;
use uni_store::storage::manager::StorageManager;
#[async_trait::async_trait]
pub trait ForkQueryHost: Send + Sync {
async fn query(&self, cypher: &str) -> Result<uni_query::QueryResult>;
fn storage(&self) -> Arc<StorageManager>;
fn schema(&self) -> Arc<uni_common::core::schema::SchemaManager>;
}
#[async_trait::async_trait]
pub trait ForkPromoteSink: Send + Sync {
async fn bulk_insert_vertices(&self, label: &str, rows: Vec<Properties>) -> Result<Vec<Vid>>;
async fn bulk_insert_edges(
&self,
edge_type: &str,
edges: Vec<(Vid, Vid, Properties)>,
) -> Result<()>;
}