fix
Some checks failed
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
JMARyA 2025-01-02 19:10:27 +01:00
parent 8df8edeeca
commit a21fd44f64
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -29,8 +29,8 @@ pub struct DocEmbedding {
}
impl DocEmbedding {
pub async fn total_chunks(&self) -> i64 {
let res: (i64,) = sqlx::query_as(
pub async fn total_chunks(&self) -> i32 {
let res: (i32,) = sqlx::query_as(
"SELECT MAX(chunk) FROM doc_embedding WHERE domain = $1 AND path = $2 AND ver = $3",
)
.bind(&self.domain)
@ -48,12 +48,12 @@ impl DocEmbedding {
pub struct SearchResult {
pub domain: String,
pub path: String,
pub total_chunks: i64,
pub total_chunks: i32,
pub chunks: Vec<DocEmbedding>,
}
impl SearchResult {
pub fn new(domain: String, path: String, total_chunks: i64) -> Self {
pub fn new(domain: String, path: String, total_chunks: i32) -> Self {
Self {
domain,
path,