File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ impl DojoWorld {
253253 bind_values. push ( decoded_cursor) ;
254254 }
255255
256- let where_sql = if !conditions. is_empty ( ) {
256+ let where_clause = if !conditions. is_empty ( ) {
257257 format ! ( "WHERE {}" , conditions. join( " AND " ) )
258258 } else {
259259 String :: new ( )
@@ -267,12 +267,16 @@ impl DojoWorld {
267267 group_concat({model_relation_table}.model_id) as model_ids
268268 FROM {table}
269269 JOIN {model_relation_table} ON {table}.id = {model_relation_table}.entity_id
270- {where_sql }
270+ {where_clause }
271271 GROUP BY {table}.event_id
272- HAVING {having_clause }
272+ { }
273273 ORDER BY {table}.event_id {order_direction}
274274 LIMIT ?
275- "
275+ " , if !having_clause. is_empty( ) {
276+ format!( "HAVING {}" , having_clause)
277+ } else {
278+ String :: new( )
279+ }
276280 ) ;
277281
278282 let mut query = sqlx:: query_as ( & query_str) ;
You can’t perform that action at this time.
0 commit comments