tangled
alpha
login
or
join now
danabra.mov
/
slices
forked from
slices.network/slices
0
fork
atom
Highly ambitious ATProtocol AppView service and sdks
0
fork
atom
overview
issues
pulls
pipelines
fix graphql contains queries
chadtmiller.com
5 months ago
301ce5f7
d5c86951
+11
-5
1 changed file
expand all
collapse all
unified
split
api
src
database
query_builder.rs
+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
142
-
let clause = if field == "json" {
143
143
-
format!("json::text ILIKE '%' || ${} || '%'", param_count)
144
144
-
} else {
145
145
-
let json_path = build_json_path(field);
146
146
-
format!("{} ILIKE '%' || ${} || '%'", json_path, param_count)
142
142
+
let clause = match field {
143
143
+
"did" | "collection" | "uri" | "cid" => {
144
144
+
format!("{} ILIKE '%' || ${} || '%'", field, param_count)
145
145
+
}
146
146
+
"json" => {
147
147
+
format!("json::text ILIKE '%' || ${} || '%'", param_count)
148
148
+
}
149
149
+
_ => {
150
150
+
let json_path = build_json_path(field);
151
151
+
format!("{} ILIKE '%' || ${} || '%'", json_path, param_count)
152
152
+
}
147
153
};
148
154
*param_count += 1;
149
155
clause