Package herddb.utils
Interface SQLRecordPredicateFunctions
-
public interface SQLRecordPredicateFunctionsPredicate expressed using SQL syntax- Author:
- enrico.olivelli
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSQLRecordPredicateFunctions.CompareResult
-
Method Summary
Static Methods Modifier and Type Method Description static Objectadd(Object a, Object b)static intcompare(Object a, Object b)Compare two values, NULL are greater than all other values and NULL == NULL.static SQLRecordPredicateFunctions.CompareResultcompareConsiderNull(Object a, Object b)Compare two values, reporting special cases about NULL.static intcompareFloatArrays(float[] arr1, float[] arr2)static intcompareNullTo(Object b)static PatterncompileLikePattern(String b, char escapeChar)static Objectdivide(Object a, Object b)static booleanlike(Object a, Object b, char escape)static booleanmatches(Object a, Pattern pattern)static Objectmodulo(Object a, Object b)static Objectmultiply(Object a, Object b)static booleanobjectEquals(Object a, Object b)static booleanobjectNotEquals(Object a, Object b)static Objectsubtract(Object a, Object b)static booleantoBoolean(Object result)
-
-
-
Method Detail
-
toBoolean
static boolean toBoolean(Object result)
-
compareNullTo
static int compareNullTo(Object b)
-
compareConsiderNull
static SQLRecordPredicateFunctions.CompareResult compareConsiderNull(Object a, Object b)
Compare two values, reporting special cases about NULL. NULL is not greater or minor than any other value and NULL is not equal to NULL.- Parameters:
a-b-- Returns:
- the outcome of the comparation.
- See Also:
compare(java.lang.Object, java.lang.Object)
-
compareFloatArrays
static int compareFloatArrays(float[] arr1, float[] arr2)
-
compare
static int compare(Object a, Object b)
Compare two values, NULL are greater than all other values and NULL == NULL. It follows the general contract ofComparator- Parameters:
a-b-- Returns:
- 1 if a is greater than b, 0 if they are equals to each other and -1 if a is minor than b
- See Also:
compareConsiderNull(java.lang.Object, java.lang.Object)
-
add
static Object add(Object a, Object b) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
modulo
static Object modulo(Object a, Object b) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
subtract
static Object subtract(Object a, Object b) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
multiply
static Object multiply(Object a, Object b) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
divide
static Object divide(Object a, Object b) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
compileLikePattern
static Pattern compileLikePattern(String b, char escapeChar) throws HerdDBInternalException
- Throws:
HerdDBInternalException
-
-