Class MapGetMethod
java.lang.Object
org.datanucleus.store.rdbms.sql.method.MapGetMethod
- All Implemented Interfaces:
SQLMethod
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SQLExpressiongetAsInnerJoin(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 SQLExpressiongetAsSubquery(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:SQLMethodReturn the expression for this SQL function.- Specified by:
getExpressionin 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
-