com.dbobjekts.metadata.column.VarcharColumns.kt Maven / Gradle / Ivy
package com.dbobjekts.metadata.column
import com.dbobjekts.api.AnyTable
import java.nio.charset.Charset
import java.sql.*
import javax.sql.rowset.serial.SerialBlob
import javax.sql.rowset.serial.SerialClob
open class VarcharColumn(table: AnyTable, name: String, aggregateType: AggregateType?) :
NonNullableColumn(table,name, String::class.java, aggregateType), IsCharacterColumn {
constructor(table: AnyTable, name: String) : this(table, name, null)
override fun getValue(position: Int, resultSet: ResultSet): String? = resultSet.getString(position)
override fun setValue(position: Int, statement: PreparedStatement, value: String) =
statement.setString(position, value)
}
open class NullableVarcharColumn(table: AnyTable, name: String, aggregateType: AggregateType?) :
NullableColumn(table,name, Types.VARCHAR, String::class.java, aggregateType), IsCharacterColumn {
constructor(table: AnyTable, name: String) : this(table, name, null)
override fun getValue(position: Int, resultSet: ResultSet): String? = resultSet.getString(position)
override fun setValue(position: Int, statement: PreparedStatement, value: String?) =
statement.setString(position, value)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy