Skip to content

Commit 8bc968f

Browse files
committed
fix countAll
1 parent 424cf8b commit 8bc968f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

google-cloud-firestore/src/main/java/com/google/cloud/firestore/PipelineUtils.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.google.cloud.firestore.pipeline.AggregatorTarget
99
import com.google.cloud.firestore.pipeline.Constant
1010
import com.google.cloud.firestore.pipeline.Field
1111
import com.google.cloud.firestore.pipeline.Function
12+
import com.google.cloud.firestore.pipeline.Function.Companion.count
1213
import com.google.cloud.firestore.pipeline.Function.Companion.countAll
1314
import com.google.cloud.firestore.pipeline.Function.Companion.not
1415
import com.google.firestore.v1.Cursor

google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/Expressions.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ interface Expr {
120120

121121
fun count() = Count(this, false)
122122

123-
fun min() = Count(this, false)
123+
fun min() = Function.Min(this, false)
124124

125-
fun max() = Count(this, false)
125+
fun max() = Function.Max(this, false)
126126

127127
infix fun cosineDistance(other: Expr) = CosineDistance(this, other)
128128

@@ -502,7 +502,7 @@ open class Function(val name: String, val params: List<Expr>) : Expr {
502502

503503
@JvmStatic fun max(expr: Expr) = Avg(expr, false)
504504

505-
@JvmStatic fun countAll(expr: Expr) = Count(expr, false)
505+
@JvmStatic fun count(expr: Expr) = Count(expr, false)
506506

507507
@JvmStatic fun countAll() = Count(null, false)
508508

0 commit comments

Comments
 (0)