The one thing that comes in mind is to make mutabl...
# exposed
t
The one thing that comes in mind is to make mutable expressions. Something like this:
Copy code
open class MutableOp<T>(override val columnType: IColumnType, var value: T): ExpressionWithColumnType<T>() {
    override fun toSQL(queryBuilder: QueryBuilder) = queryBuilder.registerArgument(columnType, value)
}

class IntegerMutableOp(initial: Int) : MutableOp<Int>(IntegerColumnType(), initial)

val Int.op : IntegerMutableOp get() = IntegerMutableOp(this)
// Usage            
val idValue = 12.op
val query = cities.select {
    cities.id eq idValue
}
val firstResult = query.map { it[cities.name] }
idValue.value = 15
val secondResult = query.map { it[cities.name] }