Highly ambitious ATProtocol AppView service and sdks

fix graphql contains queries

Changed files
+11 -5
api
src
database
+11 -5
api/src/database/query_builder.rs
··· 139 139 *param_count += 1; 140 140 clause 141 141 } else if let Some(_contains_value) = &condition.contains { 142 - let clause = if field == "json" { 143 - format!("json::text ILIKE '%' || ${} || '%'", param_count) 144 - } else { 145 - let json_path = build_json_path(field); 146 - format!("{} ILIKE '%' || ${} || '%'", json_path, param_count) 142 + let clause = match field { 143 + "did" | "collection" | "uri" | "cid" => { 144 + format!("{} ILIKE '%' || ${} || '%'", field, param_count) 145 + } 146 + "json" => { 147 + format!("json::text ILIKE '%' || ${} || '%'", param_count) 148 + } 149 + _ => { 150 + let json_path = build_json_path(field); 151 + format!("{} ILIKE '%' || ${} || '%'", json_path, param_count) 152 + } 147 153 }; 148 154 *param_count += 1; 149 155 clause