Skip to content

Commit 773098e

Browse files
Move QueryCondition extensions functions to QueryCondition.kt file.
1 parent f9c6b2b commit 773098e

File tree

2 files changed

+38
-19
lines changed

2 files changed

+38
-19
lines changed

objectbox-kotlin/src/main/kotlin/io/objectbox/kotlin/Extensions.kt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import io.objectbox.BoxStore
2323
import io.objectbox.Property
2424
import io.objectbox.query.Query
2525
import io.objectbox.query.QueryBuilder
26-
import io.objectbox.query.QueryCondition
2726
import io.objectbox.relation.ToMany
2827
import kotlin.reflect.KClass
2928

@@ -156,21 +155,3 @@ inline fun <T> ToMany<T>.applyChangesToDb(resetFirst: Boolean = false, body: ToM
156155
body()
157156
applyChangesToDb()
158157
}
159-
160-
/**
161-
* Combines the left hand side condition using AND with the right hand side condition.
162-
*
163-
* @see or
164-
*/
165-
infix fun <T> QueryCondition<T>.and(queryCondition: QueryCondition<T>): QueryCondition<T> {
166-
return and(queryCondition)
167-
}
168-
169-
/**
170-
* Combines the left hand side condition using OR with the right hand side condition.
171-
*
172-
* @see and
173-
*/
174-
infix fun <T> QueryCondition<T>.or(queryCondition: QueryCondition<T>): QueryCondition<T> {
175-
return or(queryCondition)
176-
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright 2020 ObjectBox Ltd. All rights reserved.
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+
17+
package io.objectbox.kotlin
18+
19+
import io.objectbox.query.QueryCondition
20+
21+
22+
/**
23+
* Combines the left hand side condition using AND with the right hand side condition.
24+
*
25+
* @see or
26+
*/
27+
infix fun <T> QueryCondition<T>.and(queryCondition: QueryCondition<T>): QueryCondition<T> {
28+
return and(queryCondition)
29+
}
30+
31+
/**
32+
* Combines the left hand side condition using OR with the right hand side condition.
33+
*
34+
* @see and
35+
*/
36+
infix fun <T> QueryCondition<T>.or(queryCondition: QueryCondition<T>): QueryCondition<T> {
37+
return or(queryCondition)
38+
}

0 commit comments

Comments
 (0)