SimonJF / skye-gtopdb

Implementation of the GtoPdb in Links
Apache License 2.0
0 stars 0 forks source link

Better way of fetching hierarchical data? #2

Open SimonJF opened 5 years ago

SimonJF commented 5 years ago

receptorFamilies.links queries data which is hierarchical. There's no neat way to do this with the current LINQ implementation, since recursion is disallowed. Currently, the implementation does n queries, where n is the depth of the tree.

Oracle has a CONNECT BY statement, which seems to be related: https://docs.oracle.com/cd/B19306_01/server.102/b14200/queries003.htm

Similarly, Postgres has a RECURSIVE query: https://stackoverflow.com/questions/24898681/what-is-the-equivalent-postgresql-syntax-to-oracles-connect-by-start-with

This would take quite a lot of work (and probably research).