File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
src/main/kotlin/io/objectbox/kotlin Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ buildscript {
20
20
apply plugin : ' kotlin'
21
21
apply plugin : ' org.jetbrains.dokka'
22
22
23
- sourceCompatibility = 1.7
23
+ sourceCompatibility = 1.8
24
24
25
25
dokka {
26
26
outputFormat = ' html'
@@ -58,6 +58,7 @@ dependencies {
58
58
compile " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
59
59
60
60
compile project(' :objectbox-java' )
61
+ compileOnly project(' :objectbox-rxjava3' )
61
62
}
62
63
63
64
Original file line number Diff line number Diff line change
1
+ package io.objectbox.kotlin
2
+
3
+ import io.objectbox.query.Query
4
+ import io.objectbox.rx3.RxQuery
5
+ import io.reactivex.rxjava3.core.BackpressureStrategy
6
+ import io.reactivex.rxjava3.core.Flowable
7
+ import io.reactivex.rxjava3.core.Observable
8
+ import io.reactivex.rxjava3.core.Single
9
+
10
+ /* *
11
+ * Shortcut for [`RxQuery.flowableOneByOne(query, strategy)`][RxQuery.flowableOneByOne].
12
+ */
13
+ fun <T > Query<T>.flowableOneByOne (strategy : BackpressureStrategy = BackpressureStrategy .BUFFER ): Flowable <T > {
14
+ return RxQuery .flowableOneByOne(this , strategy)
15
+ }
16
+
17
+ /* *
18
+ * Shortcut for [`RxQuery.observable(query)`][RxQuery.observable].
19
+ */
20
+ fun <T > Query<T>.observable (): Observable <MutableList <T >> {
21
+ return RxQuery .observable(this )
22
+ }
23
+
24
+ /* *
25
+ * Shortcut for [`RxQuery.single(query)`][RxQuery.single].
26
+ */
27
+ fun <T > Query<T>.single (): Single <MutableList <T >> {
28
+ return RxQuery .single(this )
29
+ }
You can’t perform that action at this time.
0 commit comments