Class ListGetMethod
java.lang.Object
org.datanucleus.store.rdbms.sql.method.ListGetMethod
- All Implemented Interfaces:
SQLMethod
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SQLExpressiongetAsInnerJoin(SQLStatement stmt, CollectionExpression listExpr, SQLExpression idxExpr) Implementation of List.get() using an inner join to the table representing the list, adding a condition on the index and returning the element.protected SQLExpressiongetAsSubquery(SQLStatement stmt, CollectionExpression listExpr, SQLExpression idxExpr) Implementation of Collection.get() using a subquery on the table representing the collection, adding a condition on the index and returning the element.getExpression(SQLStatement stmt, SQLExpression expr, List<SQLExpression> args) Return the expression for this SQL function.
-
Constructor Details
-
ListGetMethod
public ListGetMethod()
-
-
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, CollectionExpression listExpr, SQLExpression idxExpr) Implementation of Collection.get() using a subquery on the table representing the collection, adding a condition on the index and returning the element.- Parameters:
stmt- SQLStatementlistExpr- The list expressionidxExpr- The index expression- Returns:
- The element expression
-
getAsInnerJoin
protected SQLExpression getAsInnerJoin(SQLStatement stmt, CollectionExpression listExpr, SQLExpression idxExpr) Implementation of List.get() using an inner join to the table representing the list, adding a condition on the index and returning the element.- Parameters:
stmt- SQLStatementlistExpr- The list expressionidxExpr- The index expression- Returns:
- The element expression
-