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 {
2020apply plugin : ' kotlin'
2121apply plugin : ' org.jetbrains.dokka'
2222
23- sourceCompatibility = 1.7
23+ sourceCompatibility = 1.8
2424
2525dokka {
2626 outputFormat = ' html'
@@ -58,6 +58,7 @@ dependencies {
5858 compile " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
5959
6060 compile project(' :objectbox-java' )
61+ compileOnly project(' :objectbox-rxjava3' )
6162}
6263
6364
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