DATAJDBC-478 - Expose arguments of SimpleCondition and SimpleFunction.
We now allow introspection by exposing the arguments as function arguments and the condition expression could be subject to mapping metadata mapping.
This commit is contained in:
@@ -50,10 +50,24 @@ public class SimpleCondition extends AbstractSegment implements Condition {
|
||||
return new SimpleCondition(new Column(column, null), comparator, predicate);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the condition expression (left-hand-side)
|
||||
* @since 2.0
|
||||
*/
|
||||
public Expression getExpression() {
|
||||
return expression;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the comparator.
|
||||
*/
|
||||
public String getComparator() {
|
||||
return comparator;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the condition predicate (right-hand-side)
|
||||
*/
|
||||
public String getPredicate() {
|
||||
return predicate;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.relational.core.sql;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
@@ -74,6 +75,14 @@ public class SimpleFunction extends AbstractSegment implements Expression {
|
||||
return functionName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the function arguments.
|
||||
* @since 2.0
|
||||
*/
|
||||
public List<Expression> getExpressions() {
|
||||
return Collections.unmodifiableList(expressions);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
|
||||
Reference in New Issue
Block a user