Class BinaryExpression
java.lang.Object
org.datanucleus.store.rdbms.sql.expression.SQLExpression
org.datanucleus.store.rdbms.sql.expression.BinaryExpression
- Direct Known Subclasses:
BinaryLiteral
Representation of a Binary expression in a Query.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
SQLExpression.ColumnExpressionList
-
Field Summary
Fields inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
lowestOperator, mapping, parameterName, st, stmt, subExprs, table
-
Constructor Summary
ConstructorsConstructorDescriptionBinaryExpression
(SQLStatement stmt, JavaTypeMapping mapping, String functionName, List<SQLExpression> args, List types) BinaryExpression
(SQLStatement stmt, SQLTable table, JavaTypeMapping mapping) Constructor for an SQL expression for a (field) mapping in a specified table. -
Method Summary
Modifier and TypeMethodDescriptioneq
(SQLExpression expr) Equality operator (equals to)gt
(SQLExpression expr) Relational operator (greater than)gteq
(SQLExpression expr) in
(SQLExpression expr, boolean not) In expression.lt
(SQLExpression expr) Relational operator (lower than)lteq
(SQLExpression expr) noteq
(SQLExpression expr) Methods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
add, and, bitAnd, bitOr, cast, com, distinct, div, encloseInParentheses, eor, ge, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, invoke, ior, is, isParameter, le, mod, mul, ne, neg, not, setJavaTypeMapping, sub, toSQLText, unDistinct
-
Constructor Details
-
BinaryExpression
Constructor for an SQL expression for a (field) mapping in a specified table.- Parameters:
stmt
- The statementtable
- The table in the statementmapping
- The mapping for the field
-
BinaryExpression
public BinaryExpression(SQLStatement stmt, JavaTypeMapping mapping, String functionName, List<SQLExpression> args, List types) - Parameters:
stmt
- SQL statementmapping
- The mappingfunctionName
- Function to invokeargs
- Function argstypes
- Function arg types
-
-
Method Details
-
eq
Description copied from class:SQLExpression
Equality operator (equals to)- Overrides:
eq
in classSQLExpression
- Parameters:
expr
- the right-hand operand- Returns:
- The type of an equality expression is a boolean
-
noteq
-
lt
Description copied from class:SQLExpression
Relational operator (lower than)- Overrides:
lt
in classSQLExpression
- Parameters:
expr
- the right-hand operand- Returns:
- true if the value of the left-hand operand is less than the value of the right-hand operand, and otherwise is false.
-
lteq
-
gt
Description copied from class:SQLExpression
Relational operator (greater than)- Overrides:
gt
in classSQLExpression
- Parameters:
expr
- the right-hand operand- Returns:
- true if the value of the left-hand operand is greater than the value of the right-hand operand, and otherwise is false.
-
gteq
-
in
Description copied from class:SQLExpression
In expression. Return true if this is contained byexpr
- Overrides:
in
in classSQLExpression
- Parameters:
expr
- the right-hand expressionnot
- Whether we really want "not in"- Returns:
- true if the left-hand expression is contained by the right-hand expression. Otherwise the result is false.
-