File tree 2 files changed +0
-21
lines changed
gto-support-db-async/src/main/java/org/ccci/gto/android/common/db
2 files changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -5,35 +5,22 @@ import androidx.concurrent.futures.CallbackToFutureAdapter
5
5
import com.google.common.util.concurrent.ListenableFuture
6
6
7
7
interface AsyncDao : Dao {
8
- @JvmDefault
9
8
fun <T : Any > getAsync (query : Query <T >) = runAsync { get(query) }
10
9
11
- @JvmDefault
12
10
fun getCursorAsync (query : Query <* >) = runAsync { getCursor(query) }
13
11
14
- @JvmDefault
15
12
fun <T : Any > findAsync (clazz : Class <T >, vararg key : Any ) = runAsync { find(clazz, * key) }
16
13
17
- @JvmDefault
18
14
fun insertAsync (obj : Any ) = insertAsync(obj, SQLiteDatabase .CONFLICT_NONE )
19
-
20
- @JvmDefault
21
15
fun insertAsync (obj : Any , conflictAlgorithm : Int ) = runAsync { insert(obj, conflictAlgorithm) }
22
16
23
- @JvmDefault
24
17
fun updateAsync (obj : Any ) = updateAsync(obj, * getFullProjection(obj.javaClass))
25
-
26
- @JvmDefault
27
18
fun updateAsync (obj : Any , vararg projection : String ) = runAsync { update(obj, * projection) }
28
19
29
- @JvmDefault
30
20
fun <T : Any > updateAsync (sample : T , where : Expression ? , vararg projection : String ) =
31
21
runAsync { update(sample, where, * projection) }
32
22
33
- @JvmDefault
34
23
fun updateOrInsertAsync (obj : Any ) = updateOrInsertAsync(obj, * getFullProjection(obj.javaClass))
35
-
36
- @JvmDefault
37
24
fun updateOrInsertAsync (obj : Any , vararg projection : String ) = runAsync { updateOrInsert(obj, * projection) }
38
25
39
26
companion object {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments