1 /*
2  * Copyright (C) 2022 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package androidx.room
17 
18 import androidx.sqlite.SQLiteConnection
19 import io.reactivex.Completable
20 import io.reactivex.Flowable
21 import io.reactivex.Maybe
22 import io.reactivex.Observable
23 import io.reactivex.Single
24 import java.util.concurrent.Callable
25 
26 // mock rx2 helper
27  class RxRoom {
28 
29     companion object {
30 
31         @JvmField
32         val NOTHING: Any = Any()
33 
34         @JvmStatic
createFlowablenull35         fun <T : Any> createFlowable(
36             db: RoomDatabase,
37             inTransaction: Boolean,
38             tableNames: Array<String>,
39             block: (SQLiteConnection) -> T?
40         ): Flowable<T> {
41             TODO()
42         }
43 
44         @JvmStatic
createObservablenull45         fun <T : Any> createObservable(
46             db: RoomDatabase,
47             inTransaction: Boolean,
48             tableNames: Array<String>,
49             block: (SQLiteConnection) -> T?
50         ): Observable<T> {
51             TODO()
52         }
53 
54         @JvmStatic
createMaybenull55         fun <T : Any> createMaybe(
56             db: RoomDatabase,
57             isReadOnly: Boolean,
58             inTransaction: Boolean,
59             block: (SQLiteConnection) -> T?
60         ): Maybe<T> {
61             TODO()
62         }
63 
64         @JvmStatic
createCompletablenull65         fun createCompletable(
66             db: RoomDatabase,
67             isReadOnly: Boolean,
68             inTransaction: Boolean,
69             block: (SQLiteConnection) -> Unit
70         ): Completable {
71             TODO()
72         }
73 
74         @JvmStatic
createSinglenull75         fun <T : Any> createSingle(
76             db: RoomDatabase,
77             isReadOnly: Boolean,
78             inTransaction: Boolean,
79             block: (SQLiteConnection) -> T?
80         ): Single<T> {
81             TODO()
82         }
83 
84         @JvmStatic
createFlowablenull85         fun createFlowable(database: RoomDatabase, vararg tableNames: String): Flowable<Any> {
86             TODO()
87         }
88 
89         @JvmStatic
createObservablenull90         fun createObservable(database: RoomDatabase, vararg tableNames: String): Observable<Any> {
91             TODO()
92         }
93     }
94 }
95