Class MapGetMethod
java.lang.Object
org.datanucleus.store.rdbms.sql.method.MapGetMethod
- All Implemented Interfaces:
SQLMethod
Method for evaluating {mapExpr}.get(keyExpr).
Returns an ObjectExpression representing the value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SQLExpression
getAsInnerJoin
(SQLStatement stmt, MapExpression mapExpr, SQLExpression keyValExpr) Implementation of Map.get() using an inner join to the table representing the map, adding a condition on the key and returning the value.protected SQLExpression
getAsSubquery
(SQLStatement stmt, MapExpression mapExpr, SQLExpression keyValExpr) Implementation of Map.get() using a subquery on the table representing the map, adding a condition on the key and returning the value.getExpression
(SQLStatement stmt, SQLExpression expr, List<SQLExpression> args) Return the expression for this SQL function.
-
Constructor Details
-
MapGetMethod
public MapGetMethod()
-
-
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
-
getAsSubquery
protected SQLExpression getAsSubquery(SQLStatement stmt, MapExpression mapExpr, SQLExpression keyValExpr) Implementation of Map.get() using a subquery on the table representing the map, adding a condition on the key and returning the value.- Parameters:
stmt
- SQLStatementmapExpr
- The map expressionkeyValExpr
- The key value expression- Returns:
- The value expression
-
getAsInnerJoin
protected SQLExpression getAsInnerJoin(SQLStatement stmt, MapExpression mapExpr, SQLExpression keyValExpr) Implementation of Map.get() using an inner join to the table representing the map, adding a condition on the key and returning the value.- Parameters:
stmt
- SQLStatementmapExpr
- The map expressionkeyValExpr
- The key value expression- Returns:
- The value expression
-