de.fuberlin.wiwiss.d2rq.rdql
Class OperatorMap
java.lang.Object
de.fuberlin.wiwiss.d2rq.rdql.OperatorMap
- class OperatorMap
- extends java.lang.Object
OperatorMap describes an Operator mapping from rdqlOperator to sqlOperator.
ArgTypes, leftTypes and rightTypes describe the allowed value types for the sqlOperator.
Currently we do support overloading, but do not support automatic conversion such as (5 + "7").
If sameType (default) then left and right operand must have same actual type.
If returnType=LeftType (default) then the result will have the same type as the left argument.
If returnType=RightType then the actual rightType.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rdqlOperator
public java.lang.String rdqlOperator
sqlOperator
public java.lang.String sqlOperator
leftTypes
public int leftTypes
rightTypes
public int rightTypes
returnType
public int returnType
sameType
public boolean sameType
unary
public boolean unary
functional
public boolean functional
NoType
public static final int NoType
- See Also:
- Constant Field Values
LeftRightType
public static final int LeftRightType
- See Also:
- Constant Field Values
LeftType
public static final int LeftType
- See Also:
- Constant Field Values
RightType
public static final int RightType
- See Also:
- Constant Field Values
OperatorMap
OperatorMap()
resultType
public int resultType(ExpressionTranslator.Result left)
resultType
public int resultType(ExpressionTranslator.Result left,
ExpressionTranslator.Result right)
resultType
public int resultType(ExpressionTranslator.Result left,
ExpressionTranslator.Result right,
boolean unaryApplication)
- Computes the type that results from applying the operator to left (and right).
- Parameters:
left
- right
- unaryApplication
-
- Returns:
- one of the types defined in ExpressionTranslator
applyList
public ExpressionTranslator.Result applyList(java.util.List args)
- Creates an sql expression that contains sqlOperator at infix positions
or as the head of a function call.
- Parameters:
args
-
- Returns:
- result
applyUnary
public ExpressionTranslator.Result applyUnary(ExpressionTranslator.Result arg)
- creates a unary sql expression
- Parameters:
arg
-
- Returns:
- result