From e8a68eceaa3ce7702174dcdf8c250f67431a0aa6 Mon Sep 17 00:00:00 2001 From: RWDai <27391645+RWDai@users.noreply.github.com> Date: Mon, 17 Jun 2024 15:27:26 +0800 Subject: [PATCH] fix: spi search len query --- backend/spi/spi-search/src/serv/pg/search_pg_item_serv.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/spi/spi-search/src/serv/pg/search_pg_item_serv.rs b/backend/spi/spi-search/src/serv/pg/search_pg_item_serv.rs index c81decff5..86e2bbc2e 100644 --- a/backend/spi/spi-search/src/serv/pg/search_pg_item_serv.rs +++ b/backend/spi/spi-search/src/serv/pg/search_pg_item_serv.rs @@ -461,7 +461,7 @@ pub async fn search(search_req: &mut SearchItemSearchReq, funs: &TardisFunsInst, )); } else if ext_item.op == BasicQueryOpKind::Len { if let Some(first_value) = value.pop() { - where_fragments.push(format!("(length(ext->>'{}')={})", ext_item.field, sql_vals.len() + 1)); + where_fragments.push(format!("(length(ext->>'{}') = ${})", ext_item.field, sql_vals.len() + 1)); sql_vals.push(first_value); } else { return err_not_found(ext_item);