English | 简体中文

api-docs / me.liuwj.ktorm.expression

Package me.liuwj.ktorm.expression

Expression tree and SQL generation supports, providing expression node types, tree visitor, and SQL formatter.

Types

NameSummary

AggregateExpression

data class AggregateExpression<T : Any> : ScalarExpression<T>

Aggregate expression.

AggregateType

enum class AggregateType

The enum of aggregate functions in a AggregateExpression.

ArgumentExpression

data class ArgumentExpression<T : Any> : ScalarExpression<T>

Argument expression, wraps an argument passed to the executed SQL.

BetweenExpression

data class BetweenExpression<T : Any> : 
    ScalarExpression<Boolean>

Between expression, check if a scalar expression is in the given range.

BinaryExpression

data class BinaryExpression<T : Any> : ScalarExpression<T>

Binary expression.

BinaryExpressionType

enum class BinaryExpressionType

Enum for binary expressions.

CastingExpression

data class CastingExpression<T : Any> : ScalarExpression<T>

Wrap a SQL expression, changing its return type.

ColumnAssignmentExpression

data class ColumnAssignmentExpression<T : Any> : 
    SqlExpression

Column assignment expression, represents a column assignment for insert or update statements.

ColumnDeclaringExpression

data class ColumnDeclaringExpression<T : Any> : 
    ScalarExpression<T>

Column declaring expression, represents the selected columns in a SelectExpression.

ColumnExpression

data class ColumnExpression<T : Any> : ScalarExpression<T>

Column expression.

DeleteExpression

data class DeleteExpression : SqlExpression

Delete expression, represents the delete statement in SQL.

ExistsExpression

data class ExistsExpression : ScalarExpression<Boolean>

Exists expression, check if the specific query has at least one result.

FunctionExpression

data class FunctionExpression<T : Any> : ScalarExpression<T>

Function expression, represents a SQL function call.

InListExpression

data class InListExpression<T : Any> : 
    ScalarExpression<Boolean>

In-list expression, translated to the in keyword in SQL.

InsertExpression

data class InsertExpression : SqlExpression

Insert expression, represents the insert statement in SQL.

InsertFromQueryExpression

data class InsertFromQueryExpression : SqlExpression

Insert-from-query expression, eg. insert into tmp(num) select 1 from dual.

JoinExpression

data class JoinExpression : QuerySourceExpression

Join expression.

JoinType

enum class JoinType

The enum of joining types in a JoinExpression.

OrderByExpression

data class OrderByExpression : SqlExpression

Order-by expression.

OrderType

enum class OrderType

The enum of order directions in a OrderByExpression.

QueryExpression

sealed class QueryExpression : QuerySourceExpression

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

QuerySourceExpression

abstract class QuerySourceExpression : SqlExpression

Query source expression, used in the from clause of a SelectExpression.

ScalarExpression

abstract class ScalarExpression<T : Any> : 
    SqlExpression,
    ColumnDeclaring<T>

Base class of scalar expressions. An expression is “scalar” if it has a return value (eg. a + 1).

SelectExpression

data class SelectExpression : QueryExpression

Select expression, represents a select statement of SQL.

SqlExpression

abstract class SqlExpression

Root class of SQL expressions or statements.

SqlExpressionVisitor

open class SqlExpressionVisitor

Base class designed to visit or modify SQL expression trees using visitor pattern.

SqlFormatter

open class SqlFormatter : SqlExpressionVisitor

Subclass of SqlExpressionVisitor, visiting SQL expression trees using visitor pattern. After the visit completes,
the executable SQL string will be generated in the sql property with its execution parameters in parameters.

TableExpression

data class TableExpression : QuerySourceExpression

Table expression.

UnaryExpression

data class UnaryExpression<T : Any> : ScalarExpression<T>

Unary expression.

UnaryExpressionType

enum class UnaryExpressionType

Enum for unary expressions.

UnionExpression

data class UnionExpression : QueryExpression

Union expression, represents a union statement of SQL.

UpdateExpression

data class UpdateExpression : SqlExpression

Update expression, represents the update statement in SQL.