Well, the best idea I can come up with that stays in line with the idea of transitive closure trees being fast to query is to keep the preorder as an integer on the data table.
This method means moving all those integers up when we insert somewhere in the middle of the preorder, but ah well, at least that process comes during the not so common write instead of read.
This method means moving all those integers up when we insert somewhere in the middle of the preorder, but ah well, at least that process comes during the not so common write instead of read.