UnionExpression

data class UnionExpression(val left: QueryExpression, val right: QueryExpression, val isUnionAll: Boolean, val orderBy: List<OrderByExpression> = emptyList(), val offset: Int? = null, val limit: Int? = null, val tableAlias: String? = null, val extraProperties: Map<String, Any> = emptyMap()) : QueryExpression(source)

Union expression, represents a union statement of SQL.

Constructors

Link copied to clipboard
constructor(left: QueryExpression, right: QueryExpression, isUnionAll: Boolean, orderBy: List<OrderByExpression> = emptyList(), offset: Int? = null, limit: Int? = null, tableAlias: String? = null, extraProperties: Map<String, Any> = emptyMap())

Properties

Link copied to clipboard
open override val extraProperties: Map<String, Any>

Extra properties of this expression, maybe useful in SqlFormatter to generate some special SQLs.

Link copied to clipboard
override val isLeafNode: Boolean = false

Check if this expression is a leaf node in expression trees.

Link copied to clipboard

mark if this union statement is union all.

Link copied to clipboard

the left query of this union expression.

Link copied to clipboard
open override val limit: Int? = null

max record numbers returned by the query.

Link copied to clipboard
open override val offset: Int? = null

the offset of the first returned record.

Link copied to clipboard
open override val orderBy: List<OrderByExpression>

a list of order-by expressions, used in the order by clause of a query.

Link copied to clipboard

the right query of this union expression.

Link copied to clipboard
open override val tableAlias: String? = null

the alias when this query is nested in another query's source, e.g. select * from (...) alias.