getExpectedJdbcType

open override fun getExpectedJdbcType(tableColumnMetadata: TableColumnMetadata): KType

MySQL-specific deviations from the default type mapping:

  • INT UNSIGNED does not fit an Int (0 .. 2^32 - 1), so it is read as Long, and BIGINT UNSIGNED does not fit a Long (0 .. 2^64 - 1), so it is read as java.math.BigInteger. The driver returns exactly those types for them.

  • A multi-bit BIT(M) column is read as ByteArray, because that is what the driver returns for it while reporting java.lang.Boolean as the column class — see isMultiBit and #2087.

Everything else falls through to DbType.getExpectedJdbcType.