public class Expression extends SqlObject
Expressions can be plain String
s or SQL objects like a Column
.
To connect expression objects use the operator methods:
Modifier and Type | Field and Description |
---|---|
protected SqlExpression |
delegate |
Modifier and Type | Method and Description |
---|---|
Expression |
as(String alias)
Deprecated.
replaced by
AS(String) |
Expression |
AS(String alias)
Creates an aliased version of this expression object.
|
Condition |
BETWEEN(Object lower,
Object upper) |
Condition |
eq(Object value)
The equals operator (=) for expressions.
|
Condition |
gt(Object value)
The greater than operator (>) for expressions.
|
Condition |
gte(Object value)
The greater than equals operator (>=) for expressions.
|
Condition |
IN(Object... values) |
Condition |
IS_NOT_NULL() |
Condition |
IS_NULL() |
Condition |
LIKE(Object value) |
Condition |
lt(Object value)
The lower than operator (<) for expressions.
|
Condition |
lte(Object value)
The lower than equals operator (<=) for expressions.
|
Condition |
ne(Object value)
The not equals operator (!= | <>) for expressions.
|
Condition |
NOT_BETWEEN(Object lower,
Object upper) |
Condition |
NOT_IN(Object... values) |
Condition |
NOT_LIKE(Object value) |
static Expression |
valueOf(Object expression)
Wraps a plain object into a expression to be used in the SQL API.
|
protected SqlExpression delegate
public static Expression valueOf(Object expression)
expression
- the expression to wrap.@Deprecated public Expression as(String alias)
AS(String)
public Expression AS(String alias)
alias
- the new aliaspublic Condition eq(Object value)
Connects this expression object and the expression parameter via the '=' operator and returns the connection as a new condition object.
value
- the right side of the connectionpublic Condition ne(Object value)
Connects this expression object and the expression parameter via the '!=' operator and returns the connection as a new condition object.
value
- the right side of the connectionpublic Condition gt(Object value)
Connects this expression object and the expression parameter via the '>' operator and returns the connection as a new condition object.
value
- the right side of the connectionpublic Condition lt(Object value)
Connects this expression object and the expression parameter via the '<' operator and returns the connection as a new condition object.
value
- the right side of the connectionpublic Condition gte(Object value)
Connects this expression object and the expression parameter via the '>=' operator and returns the connection as a new condition object.
value
- the right side of the connectionpublic Condition lte(Object value)
Connects this expression object and the expression parameter via the '<=' operator and returns the connection as a new condition object.
value
- the right side of the connectionpublic Condition IS_NULL()
public Condition IS_NOT_NULL()
Copyright © 2003–2021 XDEV Software. All rights reserved.