Fixed conditions being inaccurately represented
This commit is contained in:
parent
99d7d8ddbc
commit
d86fb033ea
@ -14,7 +14,9 @@ interface MagiskQueryBuilder {
|
|||||||
Builder::class.java.newInstance()
|
Builder::class.java.newInstance()
|
||||||
.apply(builder)
|
.apply(builder)
|
||||||
.toString()
|
.toString()
|
||||||
.let { MagiskQuery(it) }
|
.let {
|
||||||
|
MagiskQuery(it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -131,11 +133,11 @@ class Condition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun and(builder: Condition.() -> Unit) {
|
fun and(builder: Condition.() -> Unit) {
|
||||||
condition += " " + Condition().apply(builder).condition
|
condition = "($condition AND ${Condition().apply(builder).condition})"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun or(builder: Condition.() -> Unit) {
|
fun or(builder: Condition.() -> Unit) {
|
||||||
condition += " " + Condition().apply(builder).condition
|
condition = "($condition OR ${Condition().apply(builder).condition})"
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
|
Loading…
Reference in New Issue
Block a user