update comment_aggregates ca
set child_count = c.child_count from (
select c.id, c.path, count(c2.id) as child_count
from comment c join comment c2 on c2.path <@ c.path and c2.path != c.path and c.path <@ $1
group by c.id
)
as c
where ca.comment_id = c.id
So it seems this code is just raw SQL within the Rust logic…
https://github.com/LemmyNet/lemmy/blob/66ac8100d98d721136205ed0de2a1d7abb1e0d1d/crates/db_schema/src/impls/comment.rs#L108
Is there no whitespace between two Rust functions? I thought that source code was strictly formatted by woodpecker testing?
https://github.com/LemmyNet/lemmy/blob/66ac8100d98d721136205ed0de2a1d7abb1e0d1d/crates/db_schema/src/impls/comment.rs#L126
ok, comment is joining itself?