Skip to content

Commit

Permalink
fix:
Browse files Browse the repository at this point in the history
  • Loading branch information
ljl committed May 25, 2024
1 parent 0c4f176 commit 9af69d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/spi/spi-search/src/serv/pg/search_pg_item_serv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ pub async fn search(search_req: &mut SearchItemSearchReq, funs: &TardisFunsInst,
where_fragments.push(format!("ext ->> '{}' is null", ext_item.field));
} else if ext_item.op == BasicQueryOpKind::IsNotNull {
where_fragments.push(format!(
"ext ->> '{}' is not null or ext ->> '{}' != '' or ext ->> '{}' != '[]'",
"(ext ->> '{}' is not null or ext ->> '{}' != '' or ext ->> '{}' != '[]')",
ext_item.field, ext_item.field, ext_item.field
));
} else if ext_item.op == BasicQueryOpKind::IsNullOrEmpty {
Expand Down Expand Up @@ -562,7 +562,7 @@ pub async fn search(search_req: &mut SearchItemSearchReq, funs: &TardisFunsInst,
sql_and_where.push(format!("ext ->> '{}' is null", ext_item.field));
} else if ext_item.op == BasicQueryOpKind::IsNotNull {
where_fragments.push(format!(
"ext ->> '{}' is not null or ext ->> '{}' != '' or ext ->> '{}' != '[]'",
"(ext ->> '{}' is not null or ext ->> '{}' != '' or ext ->> '{}' != '[]')",
ext_item.field, ext_item.field, ext_item.field
));
} else if ext_item.op == BasicQueryOpKind::IsNullOrEmpty {
Expand Down

0 comments on commit 9af69d3

Please sign in to comment.