validation progress
This commit is contained in:
@ -185,9 +185,9 @@ impl<'a> Compiler<'a> {
|
||||
select_args.append(&mut poly_args);
|
||||
|
||||
let jsonb_obj_sql = if select_args.is_empty() {
|
||||
"jsonb_build_object()".to_string()
|
||||
"jsonb_strip_nulls(jsonb_build_object())".to_string()
|
||||
} else {
|
||||
format!("jsonb_build_object({})", select_args.join(", "))
|
||||
format!("jsonb_strip_nulls(jsonb_build_object({}))", select_args.join(", "))
|
||||
};
|
||||
|
||||
// 3. Build WHERE clauses
|
||||
@ -325,7 +325,7 @@ impl<'a> Compiler<'a> {
|
||||
}
|
||||
build_args.push(format!("'{}', {}", k, child_sql));
|
||||
}
|
||||
let combined = format!("jsonb_build_object({})", build_args.join(", "));
|
||||
let combined = format!("jsonb_strip_nulls(jsonb_build_object({}))", build_args.join(", "));
|
||||
Ok((combined, "object".to_string()))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user