Class MapKeyMethod
java.lang.Object
org.datanucleus.store.rdbms.sql.method.MapKeyMethod
- All Implemented Interfaces:
SQLMethod
Method for evaluating KEY({mapExpr}).
Returns an ObjectExpression representing the key mapping.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SQLExpression
getAsJoin
(SQLStatement parentStmt, MapExpression mapExpr) Implementation of KEY(mapExpr) using a join to the table representing the map, and returning an expression for the key.protected SQLExpression
getAsSubquery
(SQLStatement stmt, MapExpression mapExpr) Implementation of KEY(mapExpr) using a subquery on the table representing the map.getExpression
(SQLStatement stmt, SQLExpression expr, List<SQLExpression> args) Return the expression for this SQL function.
-
Constructor Details
-
MapKeyMethod
public MapKeyMethod()
-
-
Method Details
-
getExpression
Description copied from interface:SQLMethod
Return the expression for this SQL function.- Specified by:
getExpression
in interfaceSQLMethod
- Parameters:
stmt
- SQLStatement that this expression is forexpr
- The expression that it is invoked onargs
- Arguments passed in- Returns:
- The SQL expression using the SQL function
-
getAsJoin
Implementation of KEY(mapExpr) using a join to the table representing the map, and returning an expression for the key.- Parameters:
parentStmt
- The parent SQL statementmapExpr
- The map expression- Returns:
- The value expression
-
getAsSubquery
Implementation of KEY(mapExpr) using a subquery on the table representing the map.- Parameters:
stmt
- SQLStatementmapExpr
- The map expression- Returns:
- The value expression
-