override fun nonNullValueToString()

in exposed-core/src/main/kotlin/org/jetbrains/exposed/v1/core/datetime/LocalDateTimeColumnType.kt [56:78]


    override fun nonNullValueToString(value: T & Any): String {
        val dateTime = toLocalDateTime(value)
            .toInstant(TimeZone.currentSystemDefault())
            .toLocalDateTime(TimeZone.currentSystemDefault())

        return when (val dialect = currentDialect) {
            is SQLiteDialect -> "'${SQLITE_ORACLE_DATETIME_FORMAT.format(dateTime)}'"
            is OracleDialect -> {
                val formatted = SQLITE_ORACLE_DATETIME_FORMAT.format(dateTime)
                "TO_TIMESTAMP('$formatted', 'YYYY-MM-DD HH24:MI:SS.FF3')"
            }
            is MysqlDialect -> {
                val formatter = if (dialect.isFractionDateTimeSupported()) {
                    MYSQL_FRACTION_DATETIME_FORMAT
                } else {
                    MYSQL_DATETIME_FORMAT
                }

                "'${formatter.format(dateTime)}'"
            }
            else -> "'${DEFAULT_DATETIME_FORMAT.format(dateTime)}'"
        }
    }