English | 简体中文

api-docs / org.ktorm.expression / QueryExpression

QueryExpression

sealed class QueryExpression : QuerySourceExpression (source code)

Base class of query expressions, provide common properties for SelectExpression and UnionExpression.

Properties

NameSummary

isLeafNode

val isLeafNode: Boolean

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

limit

abstract val limit: Int?

max record numbers returned by the query.

offset

abstract val offset: Int?

the offset of the first returned record.

orderBy

abstract val orderBy: List<OrderByExpression>

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

tableAlias

abstract val tableAlias: String?

the alias when this query is nested in another query’s source, eg. select * from (...) alias.

Extension Functions

NameSummary

eq

infix fun <T : Any> T.eq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Equal operator, translated to = in SQL.

neq

infix fun <T : Any> T.neq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Not-equal operator, translated to <> in SQL.

notEq

infix fun <T : Any> T.notEq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Not-equal operator, translated to <> in SQL.

Inheritors

NameSummary

SelectExpression

data class SelectExpression : QueryExpression

Select expression, represents a select statement of SQL.

UnionExpression

data class UnionExpression : QueryExpression

Union expression, represents a union statement of SQL.