sunday1105 opened a new issue, #28474:
URL: https://github.com/apache/shardingsphere/issues/28474

   ## Question
   Which version supports recursive queries?
   
   <dependency>
       <groupId>org.apache.shardingsphere</groupId>
       <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
       <version>5.1.0</version>
   </dependency>
   
   Logic SQL: WITH RECURSIVE DirectoryCTE as (
           select *
           from table1
           where id = ?
           and project_id = ?
           union all
           select *   
           from table1 t
           INNER JOIN DirectoryCTE cte ON t.project_id = cte.project_id and 
t.parent_id = cte.id
           )
           select
           *  
           from DirectoryCTE
           order by `level`
   
   ---------------
   
   Actual SQL: ds-master ::: WITH RECURSIVE DirectoryCTE as (
           select *
           from table1
           where id = ?
           and project_id = ?
           union all
           select *
           from project_file_catalog t
           INNER JOIN DirectoryCTE cte ON t.project_id = cte.project_id and 
t.parent_id = cte.id
           )
           select *
           from DirectoryCTE
           order by `level`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to