union All
Appends a UNION ALL operator to the current query, combining its result set with another SELECT statement.
The UNION ALL operator combines the result sets of two or more SELECT statements, including all duplicate rows. This is generally faster than UNION because it doesn't need to check for duplicates. The SELECT statements being combined must have the same number of columns in their result sets with similar data types.
Example:
ActiveEmployees
.select(
ActiveEmployees.id,
ActiveEmployees.name
).unionAll {
FormerEmployees.select(
FormerEmployees.id,
FormerEmployees.name
)
}.execute(con)Content copied to clipboard
This would generate SQL similar to: SELECT id, name FROM ActiveEmployees UNION ALL SELECT id, name FROM FormerEmployees;
Return
A new SelectStatement representing the combined query.
Author
MOHAMMAD AZIM ANSARI
Parameters
select
A lambda function that returns the SelectStatement to be combined with the current query.
Type Parameters
S
The type of the KQLiteTable being queried.