Yoavya
11/02/2020, 4:43 PMtapac
11/11/2020, 7:20 AMYoavya
11/11/2020, 8:57 AMtapac
11/11/2020, 8:58 AMYoavya
11/11/2020, 8:59 AMupdated
column on every change to that rowYoavya
11/11/2020, 9:00 AMtapac
11/11/2020, 9:06 AMUpdateStatement
which will add required columns into every batch.Yoavya
11/11/2020, 9:07 AMYoavya
11/15/2020, 11:23 AMfun <T: BaseLongIdTable> T.update(where: (SqlExpressionBuilder.()->Op<Boolean>)? = null, limit: Int? = null, body: T.(UpdateStatement)->Unit): Int {
val query = UpdateStatement(this, limit, where?.let { <http://SqlExpressionBuilder.it|SqlExpressionBuilder.it>() })
body(query)
query[this.updatedAt] = LocalDateTime.now()
return query.execute(TransactionManager.current())!!
}
but then I have to make sure that I call the right update method, meaning the one I wrote and not the one in the Exposed library. seems like it can cause confusion
any tips?Filip Lastic
11/29/2021, 1:51 PMStatementInterceptors
? Because if I understand correctly, I am not able to modify arguments of current statement and getting exception Caused by: org.postgresql.util.PSQLException: No value specified for parameter 3.
Filip Lastic
11/29/2021, 2:21 PMstatement[column] = value
2. I get index of Pair(column, value)
from UpdateStatement
3. add value to (context.args as ArrayList)
to specified index.
But it doesn't look to be good usage of exposed at all (: