Skip to content

Structure

SQLCommonTableExpression

A clause describing a single Common Table Expressions, which in itws simplest form provides additional data to a primary query in the same way as joining to a subquery.
struct SQLCommonTableExpression

Overview

Note

There is no SQLDialect flag for CTE support, as CTEs are supported by all of the databases for which first-party drivers exist at the time of this writing (although they are not available in MySQL 5.7, which is long since EOL and should not be in use by anyone anymore).

Topics

Initializers

Instance Properties

  • alias
    The name used to refer to the CTE’s data.
  • columns
    A list of column names yielded by the CTE. May be empty.
  • isRecursive
    Indicates whether the CTE is recursive, e.g. whether its query is a UNION whose second subquery refers to the CTE’s own aliased name.
  • query
    The subquery which yields the CTE’s data.

Instance Methods

  • serialize(to:)
    Invoked when a request is made to serialize the expression to raw SQL.

Relationships

Conforms To