Skip to content

Commit 53545a5

Browse files
committed
Changed func signature to contain list not vararg.
1 parent 85d4784 commit 53545a5

File tree

4 files changed

+14
-14
lines changed
  • firebase-firestore/src

4 files changed

+14
-14
lines changed

firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,11 @@ actual open class Query(open val android: com.google.firebase.firestore.Query) {
295295
}
296296
)
297297

298-
internal actual fun _where(field: String, vararg arrayContainsAny: Any) = Query(
299-
android.whereArrayContainsAny(field, arrayContainsAny.toList())
298+
internal actual fun _where(field: String, arrayContainsAny: List<Any>) = Query(
299+
android.whereArrayContainsAny(field, arrayContainsAny)
300300
)
301-
internal actual fun _where(path: FieldPath, vararg arrayContainsAny: Any) = Query(
302-
android.whereArrayContainsAny(path, arrayContainsAny.toList())
301+
internal actual fun _where(path: FieldPath, arrayContainsAny: List<Any>) = Query(
302+
android.whereArrayContainsAny(path, arrayContainsAny)
303303
)
304304
}
305305

firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ expect open class Query {
6060
internal fun _where(path: FieldPath, equalTo: Any?): Query
6161
internal fun _where(field: String, lessThan: Any? = null, greaterThan: Any? = null, arrayContains: Any? = null): Query
6262
internal fun _where(path: FieldPath, lessThan: Any? = null, greaterThan: Any? = null, arrayContains: Any? = null): Query
63-
internal fun _where(field: String, vararg arrayContainsAny: Any): Query
64-
internal fun _where(path: FieldPath, vararg arrayContainsAny: Any): Query
63+
internal fun _where(field: String, arrayContainsAny: List<Any>): Query
64+
internal fun _where(path: FieldPath, arrayContainsAny: List<Any>): Query
6565
val snapshots: Flow<QuerySnapshot>
6666
suspend fun get(): QuerySnapshot
6767
}
@@ -70,8 +70,8 @@ fun Query.where(field: String, equalTo: Any?) = _where(field, equalTo)
7070
fun Query.where(path: FieldPath, equalTo: Any?) = _where(path, equalTo)
7171
fun Query.where(field: String, lessThan: Any? = null, greaterThan: Any? = null, arrayContains: Any? = null) = _where(field, lessThan, greaterThan, arrayContains)
7272
fun Query.where(path: FieldPath, lessThan: Any? = null, greaterThan: Any? = null, arrayContains: Any? = null) = _where(path, lessThan, greaterThan, arrayContains)
73-
fun Query.where(field: String, vararg arrayContainsAny: Any) = _where(field, arrayContainsAny)
74-
fun Query.where(path: FieldPath, vararg arrayContainsAny: Any) = _where(path, arrayContainsAny)
73+
fun Query.where(field: String, arrayContainsAny: List<Any>) = _where(field, arrayContainsAny)
74+
fun Query.where(path: FieldPath, arrayContainsAny: List<Any>) = _where(path, arrayContainsAny)
7575

7676

7777
expect class WriteBatch {

firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ actual open class Query(open val ios: FIRQuery) {
205205
}
206206
)
207207

208-
internal actual fun _where(field: String, vararg arrayContainsAny: Any) = Query(
209-
ios.queryWhereField(field, arrayContainsAny = arrayContainsAny.toList())
208+
internal actual fun _where(field: String, arrayContainsAny: List<Any>) = Query(
209+
ios.queryWhereField(field, arrayContainsAny = arrayContainsAny)
210210
)
211-
internal actual fun _where(path: FieldPath, vararg arrayContainsAny: Any) = Query(
212-
ios.queryWhereFieldPath(path, arrayContainsAny = arrayContainsAny.toList())
211+
internal actual fun _where(path: FieldPath, arrayContainsAny: List<Any>) = Query(
212+
ios.queryWhereFieldPath(path, arrayContainsAny = arrayContainsAny)
213213
)
214214
}
215215
actual class CollectionReference(override val ios: FIRCollectionReference) : Query(ios) {

firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,10 @@ actual open class Query(open val js: firebase.firestore.Query) {
269269
)
270270
}
271271

272-
internal actual fun _where(field: String, vararg arrayContainsAny: Any) = rethrow {
272+
internal actual fun _where(field: String, arrayContainsAny: List<Any>) = rethrow {
273273
Query(js.where(field, "array-contains-any", arrayContainsAny))
274274
}
275-
internal actual fun _where(path: FieldPath, vararg arrayContainsAny: Any) = rethrow {
275+
internal actual fun _where(path: FieldPath, arrayContainsAny: List<Any>) = rethrow {
276276
Query(js.where(path, "array-contains-any", arrayContainsAny))
277277
}
278278

0 commit comments

Comments
 (0)