Skip to content

Commit 2062c94

Browse files
committed
Merge branch 'tomandersen/pipelines' into tomandersen/pipelines-evaluate
# Conflicts: # firebase-firestore/src/main/java/com/google/firebase/firestore/pipeline/expressions.kt
2 parents db7c444 + b4f04ac commit 2062c94

File tree

1 file changed

+33
-49
lines changed
  • firebase-firestore/src/main/java/com/google/firebase/firestore/pipeline

1 file changed

+33
-49
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/pipeline/expressions.kt

Lines changed: 33 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -773,52 +773,48 @@ abstract class Expr internal constructor() {
773773
fun sqrt(numericField: String): Expr = FunctionExpr("sqrt", evaluateSqrt, numericField)
774774

775775
/**
776-
* Creates an expression that adds numeric expressions and constants.
776+
* Creates an expression that adds numeric expressions.
777777
*
778778
* @param first Numeric expression to add.
779779
* @param second Numeric expression to add.
780-
* @param others Additional numeric expressions or constants to add.
781780
* @return A new [Expr] representing the addition operation.
782781
*/
783782
@JvmStatic
784-
fun add(first: Expr, second: Expr, vararg others: Any): Expr =
785-
FunctionExpr("add", evaluateAdd, first, second, *others)
783+
fun add(first: Expr, second: Expr): Expr =
784+
FunctionExpr("add", evaluateAdd, first, second)
786785

787786
/**
788-
* Creates an expression that adds numeric expressions and constants.
787+
* Creates an expression that adds numeric expressions with a constant.
789788
*
790789
* @param first Numeric expression to add.
791790
* @param second Constant to add.
792-
* @param others Additional numeric expressions or constants to add.
793791
* @return A new [Expr] representing the addition operation.
794792
*/
795793
@JvmStatic
796-
fun add(first: Expr, second: Number, vararg others: Any): Expr =
797-
FunctionExpr("add", evaluateAdd, first, second, *others)
794+
fun add(first: Expr, second: Number): Expr =
795+
FunctionExpr("add", evaluateAdd, first, second)
798796

799797
/**
800-
* Creates an expression that adds a numeric field with numeric expressions and constants.
798+
* Creates an expression that adds a numeric field with a numeric expression.
801799
*
802800
* @param numericFieldName Numeric field to add.
803801
* @param second Numeric expression to add to field value.
804-
* @param others Additional numeric expressions or constants to add.
805802
* @return A new [Expr] representing the addition operation.
806803
*/
807804
@JvmStatic
808-
fun add(numericFieldName: String, second: Expr, vararg others: Any): Expr =
809-
FunctionExpr("add", evaluateAdd, numericFieldName, second, *others)
805+
fun add(numericFieldName: String, second: Expr): Expr =
806+
FunctionExpr("add", evaluateAdd, numericFieldName, second)
810807

811808
/**
812-
* Creates an expression that adds a numeric field with numeric expressions and constants.
809+
* Creates an expression that adds a numeric field with constant.
813810
*
814811
* @param numericFieldName Numeric field to add.
815812
* @param second Constant to add.
816-
* @param others Additional numeric expressions or constants to add.
817813
* @return A new [Expr] representing the addition operation.
818814
*/
819815
@JvmStatic
820-
fun add(numericFieldName: String, second: Number, vararg others: Any): Expr =
821-
FunctionExpr("add", evaluateAdd, numericFieldName, second, *others)
816+
fun add(numericFieldName: String, second: Number): Expr =
817+
FunctionExpr("add", evaluateAdd, numericFieldName, second)
822818

823819
/**
824820
* Creates an expression that subtracts two expressions.
@@ -865,52 +861,48 @@ abstract class Expr internal constructor() {
865861
FunctionExpr("subtract", evaluateSubtract, numericFieldName, subtrahend)
866862

867863
/**
868-
* Creates an expression that multiplies numeric expressions and constants.
864+
* Creates an expression that multiplies numeric expressions.
869865
*
870866
* @param first Numeric expression to multiply.
871867
* @param second Numeric expression to multiply.
872-
* @param others Additional numeric expressions or constants to multiply.
873868
* @return A new [Expr] representing the multiplication operation.
874869
*/
875870
@JvmStatic
876-
fun multiply(first: Expr, second: Expr, vararg others: Any): Expr =
877-
FunctionExpr("multiply", evaluateMultiply, first, second, *others)
871+
fun multiply(first: Expr, second: Expr): Expr =
872+
FunctionExpr("multiply", evaluateMultiply, first, second)
878873

879874
/**
880-
* Creates an expression that multiplies numeric expressions and constants.
875+
* Creates an expression that multiplies numeric expressions with a constant.
881876
*
882877
* @param first Numeric expression to multiply.
883878
* @param second Constant to multiply.
884-
* @param others Additional numeric expressions or constants to multiply.
885879
* @return A new [Expr] representing the multiplication operation.
886880
*/
887881
@JvmStatic
888-
fun multiply(first: Expr, second: Number, vararg others: Any): Expr =
889-
FunctionExpr("multiply", evaluateMultiply, first, second, *others)
882+
fun multiply(first: Expr, second: Number): Expr =
883+
FunctionExpr("multiply", evaluateMultiply, first, second)
890884

891885
/**
892-
* Creates an expression that multiplies a numeric field with numeric expressions and constants.
886+
* Creates an expression that multiplies a numeric field with a numeric expression.
893887
*
894888
* @param numericFieldName Numeric field to multiply.
895-
* @param second Numeric expression to add to field multiply.
896-
* @param others Additional numeric expressions or constants to multiply.
889+
* @param second Numeric expression to multiply.
897890
* @return A new [Expr] representing the multiplication operation.
898891
*/
899892
@JvmStatic
900-
fun multiply(numericFieldName: String, second: Expr, vararg others: Any): Expr =
901-
FunctionExpr("multiply", evaluateMultiply, numericFieldName, second, *others)
893+
fun multiply(numericFieldName: String, second: Expr): Expr =
894+
FunctionExpr("multiply", evaluateMultiply, numericFieldName, second)
902895

903896
/**
904-
* Creates an expression that multiplies a numeric field with numeric expressions and constants.
897+
* Creates an expression that multiplies a numeric field with a constant.
905898
*
906899
* @param numericFieldName Numeric field to multiply.
907900
* @param second Constant to multiply.
908-
* @param others Additional numeric expressions or constants to multiply.
909901
* @return A new [Expr] representing the multiplication operation.
910902
*/
911903
@JvmStatic
912-
fun multiply(numericFieldName: String, second: Number, vararg others: Any): Expr =
913-
FunctionExpr("multiply", evaluateMultiply, numericFieldName, second, *others)
904+
fun multiply(numericFieldName: String, second: Number): Expr =
905+
FunctionExpr("multiply", evaluateMultiply, numericFieldName, second)
914906

915907
/**
916908
* Creates an expression that divides two numeric expressions.
@@ -3098,24 +3090,20 @@ abstract class Expr internal constructor() {
30983090
fun documentId(): Expr = Companion.documentId(this)
30993091

31003092
/**
3101-
* Creates an expression that adds this numeric expression to other numeric expressions and
3102-
* constants.
3093+
* Creates an expression that adds this numeric expression to another numeric expression.
31033094
*
31043095
* @param second Numeric expression to add.
3105-
* @param others Additional numeric expressions or constants to add.
31063096
* @return A new [Expr] representing the addition operation.
31073097
*/
3108-
fun add(second: Expr, vararg others: Any): Expr = Companion.add(this, second, *others)
3098+
fun add(second: Expr): Expr = Companion.add(this, second)
31093099

31103100
/**
3111-
* Creates an expression that adds this numeric expression to other numeric expressions and
3112-
* constants.
3101+
* Creates an expression that adds this numeric expression to a constants.
31133102
*
31143103
* @param second Constant to add.
3115-
* @param others Additional numeric expressions or constants to add.
31163104
* @return A new [Expr] representing the addition operation.
31173105
*/
3118-
fun add(second: Number, vararg others: Any): Expr = Companion.add(this, second, *others)
3106+
fun add(second: Number): Expr = Companion.add(this, second)
31193107

31203108
/**
31213109
* Creates an expression that subtracts a constant from this numeric expression.
@@ -3134,24 +3122,20 @@ abstract class Expr internal constructor() {
31343122
fun subtract(subtrahend: Number): Expr = Companion.subtract(this, subtrahend)
31353123

31363124
/**
3137-
* Creates an expression that multiplies this numeric expression to other numeric expressions and
3138-
* constants.
3125+
* Creates an expression that multiplies this numeric expression with another numeric expression.
31393126
*
31403127
* @param second Numeric expression to multiply.
3141-
* @param others Additional numeric expressions or constants to multiply.
31423128
* @return A new [Expr] representing the multiplication operation.
31433129
*/
3144-
fun multiply(second: Expr, vararg others: Any): Expr = Companion.multiply(this, second, *others)
3130+
fun multiply(second: Expr): Expr = Companion.multiply(this, second)
31453131

31463132
/**
3147-
* Creates an expression that multiplies this numeric expression to other numeric expressions and
3148-
* constants.
3133+
* Creates an expression that multiplies this numeric expression with a constant.
31493134
*
31503135
* @param second Constant to multiply.
3151-
* @param others Additional numeric expressions or constants to multiply.
31523136
* @return A new [Expr] representing the multiplication operation.
31533137
*/
3154-
fun multiply(second: Number, vararg others: Any): Expr = Companion.multiply(this, second, *others)
3138+
fun multiply(second: Number): Expr = Companion.multiply(this, second)
31553139

31563140
/**
31573141
* Creates an expression that divides this numeric expression by another numeric expression.

0 commit comments

Comments
 (0)