Skip to content

Unify SelectStatement and WithQuery #813

@bouk

Description

@bouk

Motivation

WithQuery is currently a separate entity from SelectStatement which is unfortunate, because it restricts where you can use it, i.e. I'd like to use a WithQuery as a FROM with from_subquery in another query but I don't believe I can, because only SelectStatements are accepted.

pub fn from_subquery<T>(&mut self, query: SelectStatement, alias: T) -> &mut Self

Proposed Solutions

Move with_clause into SelectStatement/UpdateStatement/DeleteStatement/InsertStatement instead of having a separate code path for it.

Additional Information

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