tmseiler
03/13/2018, 10:15 PMtapac
03/14/2018, 6:53 AMtmseiler
03/14/2018, 12:45 PMtapac
03/14/2018, 2:11 PMval baseCondition = Op.build { FooTable.type eq type }
val extendedCondition = baseCondition and when(type) {
type1 -> Op.build { FooTable.col1 eq "bar" }
else -> Op.build {}
}
tmseiler
03/14/2018, 2:14 PMtapac
03/14/2018, 2:14 PMadjustWhere
on Query.
val baseQuery = FooTable.select { FooTable.type eq type }
if (cond()) {
baseQuery.adjustWhere {
this!!.and FooTable.col1 eq "bar"
}
}