I want to create a SQL database using Diesel. One of the tables will contain something called groups
which can be thought of as a hierarchical tree structure: a group can be root group, or it can have a single parent. Each group should have a unique_id
and a user who owns it and a potential parent.
How do I create this struct such that Diesel would be able to fetch the whole tree below a given group? If that is possible, how would I execute it?
I'm quite new to web development, so I'm not too well acquainted with how to achieve what I want.