Can I perform recursive queries?
See original GitHub issueI have a database with a hierarchical recursive structure. This is what my schema looks like:
@schema.register
class HierarchyChild(SQLAlchemyNode):
class Meta:
model = HierarchyModel
@schema.register
class Hierarchy(SQLAlchemyNode):
class Meta:
model = HierarchyModel
children = SQLAlchemyConnectionField(HierarchyChild)
Currently this returns nested results, however, it doesn’t pass the parent context to the child node. Thanks in advanced!
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
Recursive query example - IBM
A recursive query is one that is defined by a Union All with an initialization fullselect that seeds the recursion. The iterative fullselect...
Read more >Recursion in SQL Explained Visually | by Denis Lukichev
Recursion is achieved by WITH statement, in SQL jargon called Common Table Expression (CTE). It allows to name the result and reference it ......
Read more >Recursive queries - SQL Workbench/J
Recursive queries are used to query hierarchical data. The SQL standard defines a special syntax for common table expressions to enable recursive processing ......
Read more >Hierarchical and recursive queries in SQL - Wikipedia
A hierarchical query is a type of SQL query that handles hierarchical model data. They are special cases of more general recursive fixpoint...
Read more >Recursive SQL Expression Visually Explained - Built In
Recursive SQL refers to the use of a recursive common table expression (CTE) in SQL, a query that continuously references a previous result ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Sure thing. It was pretty simple actually. So I just used:
If I use just use Hierarchy without using lambda, Hierarchy is undefined.
Glad you got it working Would you mind pasting a sample for future readers?