SqlExpression

abstract class SqlExpression(source)

Root class of SQL expressions or statements.

SQL expressions are tree structures, and can be regarded as SQL abstract syntax trees (AST).

Subclasses must satisfy the following rules:

  • Must be data class, providing common abilities such as destruction, copy function, equals function, etc.

  • Must be immutable, any modify operation should return a new expression instance.

To visit or modify expression trees, use SqlExpressionVisitor.

To format expressions as executable SQL strings, use SqlFormatter.

See also

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

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

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

Link copied to clipboard
abstract val isLeafNode: Boolean

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