Skip to content

Multiple CTEs should be allowed in recursive WithQuery #830

@andrewbaxter

Description

@andrewbaxter

Description

Per https://github.com/SeaQL/sea-query/blob/master/src/backend/query_builder.rs#L780 when you do a recursive with you are only allowed to have one CTE.

In sqlite at least (and I'd expect other dbs as well) you can have any number of CTEs in the with query, per https://sqlite.org/lang_with.html . Especially see example 3.5 which has 4 recursive CTEs and one non-recursive CTE (a).

I'm not sure what the impetus for that line was, but would dropping it be reasonable? Are there other parts of the code that rely on it having only one CTE?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions