private static class SqlJdbcFunctionCall.PermutingMakeCall extends SqlJdbcFunctionCall.SimpleMakeCall
SqlJdbcFunctionCall.MakeCall
that can re-order or ignore operands.Modifier and Type | Field and Description |
---|---|
(package private) int[] |
order |
operator
Constructor and Description |
---|
PermutingMakeCall(SqlOperator operator,
int[] order)
Creates a MakeCall strategy object with reordering of operands.
|
Modifier and Type | Method and Description |
---|---|
SqlCall |
createCall(SqlParserPos pos,
SqlNode... operands)
Creates and return a
SqlCall . |
private java.lang.String |
getArgCountMismatchMsg(int... possible) |
java.lang.String |
isValidArgCount(SqlCallBinding binding) |
protected SqlNode[] |
reorder(SqlNode[] operands)
Uses the data in
order to reorder a SqlNode[] array. |
getOperator
PermutingMakeCall(SqlOperator operator, int[] order)
The reordering is specified by an int array where the value of
element at position i
indicates to which element in a
new SqlNode[] array the operand goes.
operator
- Operatororder
- Orderpublic SqlCall createCall(SqlParserPos pos, SqlNode... operands)
SqlJdbcFunctionCall.MakeCall
SqlCall
. If the MakeCall strategy object
was created with a reordering specified the call will be created with
the operands reordered, otherwise no change of ordering is appliedcreateCall
in interface SqlJdbcFunctionCall.MakeCall
createCall
in class SqlJdbcFunctionCall.SimpleMakeCall
operands
- Operandspublic java.lang.String isValidArgCount(SqlCallBinding binding)
isValidArgCount
in interface SqlJdbcFunctionCall.MakeCall
isValidArgCount
in class SqlJdbcFunctionCall.SimpleMakeCall
private java.lang.String getArgCountMismatchMsg(int... possible)
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.