use std::future::Future;
use anyhow::Result;
use crate::chunker::Chunk;
pub trait Sink {
fn create_table(&self) -> impl Future<Output = Result<()>> + Send;
fn write_document(
&self,
doc_id: &str,
chunks: &[Chunk],
embeddings: &[Vec<f32>],
tags_per_chunk: &[Vec<String>],
) -> impl Future<Output = Result<()>> + Send;
fn delete_document(&self, doc_id: &str) -> impl Future<Output = Result<i64>> + Send;
fn count_docs(&self) -> impl Future<Output = Result<i64>> + Send;
fn query_top_k(
&self,
query_vec: &[f32],
k: usize,
) -> impl Future<Output = Result<Vec<(String, i32, f64)>>> + Send;
}