Class BooleanExpression
java.lang.Object
com.google.cloud.firestore.pipeline.expressions.Expression
com.google.cloud.firestore.pipeline.expressions.BooleanExpression
-
Method Summary
Modifier and TypeMethodDescriptionfinal Expressionconditional(Expression thenExpr, Expression elseExpr) Creates a conditional expression that evaluates to athenExprexpression if this condition is true or anelseExprexpression if the condition is false.final Expressionconditional(Object thenValue, Object elseValue) Creates a conditional expression that evaluates to athenValueif this condition is true or anelseValueif the condition is false.countIf()Creates an aggregation that counts the number of stage inputs where the this boolean expression evaluates to true.final BooleanExpressionifError(BooleanExpression catchExpr) Creates an expression that returns thecatchExprargument if there is an error, else return the result of this expression.final BooleanExpressionnot()Creates an expression that negates this boolean expression.static BooleanExpressionrawFunction(String name, Expression... params) Creates a 'raw' boolean function expression.Methods inherited from class com.google.cloud.firestore.pipeline.expressions.Expression
abs, abs, abs, add, add, add, add, add, and, array, array, arrayAgg, arrayAggDistinct, arrayConcat, arrayConcat, arrayConcat, arrayContains, arrayContains, arrayContains, arrayContains, arrayContains, arrayContainsAll, arrayContainsAll, arrayContainsAll, arrayContainsAll, arrayContainsAll, arrayContainsAll, arrayContainsAny, arrayContainsAny, arrayContainsAny, arrayContainsAny, arrayContainsAny, arrayContainsAny, arrayFirst, arrayFirst, arrayFirst, arrayFirstN, arrayFirstN, arrayFirstN, arrayFirstN, arrayFirstN, arrayFirstN, arrayGet, arrayGet, arrayGet, arrayGet, arrayGet, arrayGet, arrayIndexOf, arrayIndexOf, arrayIndexOf, arrayIndexOf, arrayIndexOf, arrayIndexOf, arrayIndexOfAll, arrayIndexOfAll, arrayIndexOfAll, arrayIndexOfAll, arrayIndexOfAll, arrayIndexOfAll, arrayLast, arrayLast, arrayLast, arrayLastIndexOf, arrayLastIndexOf, arrayLastIndexOf, arrayLastIndexOf, arrayLastIndexOf, arrayLastIndexOf, arrayLastN, arrayLastN, arrayLastN, arrayLastN, arrayLastN, arrayLastN, arrayLength, arrayLength, arrayLength, arrayMaximum, arrayMaximum, arrayMaximum, arrayMaximumN, arrayMaximumN, arrayMaximumN, arrayMaximumN, arrayMaximumN, arrayMaximumN, arrayMinimum, arrayMinimum, arrayMinimum, arrayMinimumN, arrayMinimumN, arrayMinimumN, arrayMinimumN, arrayMinimumN, arrayMinimumN, arrayReverse, arrayReverse, arrayReverse, arraySum, arraySum, arraySum, as, ascending, average, byteLength, byteLength, byteLength, ceil, ceil, ceil, charLength, charLength, charLength, collectionId, collectionId, collectionId, concat, concat, concat, conditional, conditional, constant, constant, constant, constant, constant, constant, constant, constant, constant, constant, cosineDistance, cosineDistance, cosineDistance, cosineDistance, cosineDistance, cosineDistance, count, countDistinct, currentTimestamp, descending, divide, divide, divide, divide, divide, documentId, documentId, documentId, documentId, dotProduct, dotProduct, dotProduct, dotProduct, dotProduct, dotProduct, endsWith, endsWith, endsWith, endsWith, endsWith, equal, equal, equal, equal, equal, equalAny, equalAny, equalAny, equalAny, equalAny, euclideanDistance, euclideanDistance, euclideanDistance, euclideanDistance, euclideanDistance, euclideanDistance, exists, exists, exists, exp, exp, exp, field, field, first, floor, floor, floor, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, ifAbsent, ifAbsent, ifAbsent, ifAbsent, ifAbsent, ifError, ifError, ifError, ifError, ifError, isAbsent, isAbsent, isAbsent, isError, isError, isNaN, isNotNaN, isNotNaN, isNotNaN, isNotNull, isNull, join, join, join, join, join, join, last, length, length, length, lessThan, lessThan, lessThan, lessThan, lessThan, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, like, like, like, like, like, ln, ln, ln, log, log, log, log, log10, log10, log10, logicalMaximum, logicalMaximum, logicalMaximum, logicalMinimum, logicalMinimum, logicalMinimum, map, mapGet, mapGet, mapGet, mapGet, mapGet, mapMerge, mapMerge, mapMerge, mapMerge, mapMerge, mapRemove, mapRemove, mapRemove, mapRemove, mapRemove, mapRemove, maximum, minimum, mod, mod, mod, mod, mod, multiply, multiply, multiply, multiply, multiply, not, notEqual, notEqual, notEqual, notEqual, notEqual, notEqualAny, notEqualAny, notEqualAny, notEqualAny, notEqualAny, nullValue, or, pow, pow, pow, pow, pow, pow, rand, rawExpression, regexContains, regexContains, regexContains, regexContains, regexContains, regexFind, regexFind, regexFind, regexFind, regexFind, regexFindAll, regexFindAll, regexFindAll, regexFindAll, regexFindAll, regexMatch, regexMatch, regexMatch, regexMatch, regexMatch, reverse, reverse, reverse, round, round, round, roundToPrecision, roundToPrecision, roundToPrecision, roundToPrecision, roundToPrecision, roundToPrecision, split, split, split, split, split, split, sqrt, sqrt, sqrt, startsWith, startsWith, startsWith, startsWith, startsWith, stringConcat, stringConcat, stringConcat, stringConcat, stringContains, stringContains, stringContains, stringContains, stringContains, substring, substring, substring, subtract, subtract, subtract, subtract, subtract, sum, timestampAdd, timestampAdd, timestampAdd, timestampAdd, timestampAdd, timestampAdd, timestampSubtract, timestampSubtract, timestampSubtract, timestampSubtract, timestampSubtract, timestampSubtract, timestampToUnixMicros, timestampToUnixMicros, timestampToUnixMicros, timestampToUnixMillis, timestampToUnixMillis, timestampToUnixMillis, timestampToUnixSeconds, timestampToUnixSeconds, timestampToUnixSeconds, timestampTruncate, timestampTruncate, timestampTruncate, timestampTruncate, timestampTruncate, timestampTruncate, timestampTruncate, timestampTruncate, timestampTruncate, timestampTruncate, toLower, toLower, toLower, toUpper, toUpper, toUpper, trim, trim, trim, trimValue, trimValue, trimValue, trimValue, trimValue, trimValue, trunc, trunc, trunc, truncToPrecision, truncToPrecision, truncToPrecision, truncToPrecision, truncToPrecision, truncToPrecision, type, type, type, unixMicrosToTimestamp, unixMicrosToTimestamp, unixMicrosToTimestamp, unixMillisToTimestamp, unixMillisToTimestamp, unixMillisToTimestamp, unixSecondsToTimestamp, unixSecondsToTimestamp, unixSecondsToTimestamp, vectorLength, vectorLength, vectorLength, xor
-
Method Details
-
countIf
Creates an aggregation that counts the number of stage inputs where the this boolean expression evaluates to true.- Returns:
- A new
AggregateFunctionrepresenting the count aggregation.
-
conditional
Creates a conditional expression that evaluates to athenExprexpression if this condition is true or anelseExprexpression if the condition is false.- Parameters:
thenExpr- The expression to evaluate if the condition is true.elseExpr- The expression to evaluate if the condition is false.- Returns:
- A new
Expressionrepresenting the conditional operation.
-
conditional
Creates a conditional expression that evaluates to athenValueif this condition is true or anelseValueif the condition is false.- Parameters:
thenValue- Value if the condition is true.elseValue- Value if the condition is false.- Returns:
- A new
Expressionrepresenting the conditional operation.
-
ifError
Creates an expression that returns thecatchExprargument if there is an error, else return the result of this expression.- Parameters:
catchExpr- The catch expression that will be evaluated and returned if the this expression produces an error.- Returns:
- A new
Expressionrepresenting the ifError operation.
-
not
Creates an expression that negates this boolean expression.- Returns:
- A new
BooleanExpressionrepresenting the not operation.
-
rawFunction
Creates a 'raw' boolean function expression. This is useful if the expression is available in the backend, but not yet in the current version of the SDK yet.- Parameters:
name- The name of the raw function.params- The expressions to be passed as arguments to the function.- Returns:
- A new [BooleanExpression] representing the raw function.
-