But as far as I can tell, the prepare sql for inse...
# exposed
m
But as far as I can tell, the prepare sql for inserts is:
Copy code
override fun prepareSQL(transaction: Transaction): String {
        val builder = QueryBuilder(true)
        return transaction.db.dialect.insert(isIgnore, table, values.map { it.key},
                "VALUES (${values.map { builder.registerArgument(it.value, it.key.columnType) }.joinToString()})", transaction)
    }
ie the values are used just as if they were the type of the column, while for update:
Copy code
override fun prepareSQL(transaction: Transaction): String = buildString {
        val builder = QueryBuilder(true)
        append("UPDATE ${targetsSet.describe(transaction)}")
        append(" SET ")
        append(firstDataSet.map {
            val (col, value) = it
            "${transaction.identity(col)}=" + when (value) {
                is Expression<*> -> value.toSQL(builder)
                else -> builder.registerArgument(value, col.columnType)
            }
        }.joinToString())

        where?.let { append(" WHERE " + it.toSQL(builder)) }
        limit?.let { append(" LIMIT $it")}
    }
ie the value is handled differently depending on whether it is an expression or not. Maybe i’m missing something