File tree 5 files changed +8
-0
lines changed
firebase-common/src/jsMain/kotlin/dev/gitlive/firebase
androidMain/kotlin/dev/gitlive/firebase/firestore
commonMain/kotlin/dev/gitlive/firebase/firestore
iosMain/kotlin/dev/gitlive/firebase/firestore
jsMain/kotlin/dev/gitlive/firebase/firestore
5 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -339,6 +339,7 @@ external object firebase {
339
339
fun <T > runTransaction (func : (transaction: Transaction ) -> Promise <T >): Promise <T >
340
340
fun batch (): WriteBatch
341
341
fun collection (collectionPath : String ): CollectionReference
342
+ fun collectionGroup (collectionId : String ): Query
342
343
fun doc (documentPath : String ): DocumentReference
343
344
fun settings (settings : Json )
344
345
fun enablePersistence (): Promise <Unit >
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ actual class FirebaseFirestore(val android: com.google.firebase.firestore.Fireba
40
40
41
41
actual fun collection (collectionPath : String ) = CollectionReference (android.collection(collectionPath))
42
42
43
+ actual fun collectionGroup (collectionId : String ) = Query (android.collectionGroup(collectionId))
44
+
43
45
actual fun document (documentPath : String ) = DocumentReference (android.document(documentPath))
44
46
45
47
actual fun batch () = WriteBatch (android.batch())
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ expect fun Firebase.firestore(app: FirebaseApp): FirebaseFirestore
20
20
21
21
expect class FirebaseFirestore {
22
22
fun collection (collectionPath : String ): CollectionReference
23
+ fun collectionGroup (collectionId : String ): Query
23
24
fun document (documentPath : String ): DocumentReference
24
25
fun batch (): WriteBatch
25
26
fun setLoggingEnabled (loggingEnabled : Boolean )
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ actual class FirebaseFirestore(val ios: FIRFirestore) {
42
42
43
43
actual fun collection (collectionPath : String ) = CollectionReference (ios.collectionWithPath(collectionPath))
44
44
45
+ actual fun collectionGroup (collectionId : String ) = Query (ios.collectionGroupWithId(collectionId))
46
+
45
47
actual fun document (documentPath : String ) = DocumentReference (ios.documentWithPath(documentPath))
46
48
47
49
actual fun batch () = WriteBatch (ios.batch())
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ actual class FirebaseFirestore(val js: firebase.firestore.Firestore) {
38
38
39
39
actual fun collection (collectionPath : String ) = rethrow { CollectionReference (js.collection(collectionPath)) }
40
40
41
+ actual fun collectionGroup (collectionId : String ) = Query (js.collectionGroup(collectionId))
42
+
41
43
actual fun document (documentPath : String ) = rethrow { DocumentReference (js.doc(documentPath)) }
42
44
43
45
actual fun batch () = rethrow { WriteBatch (js.batch()) }
You can’t perform that action at this time.
0 commit comments