TableColumnMetadata

class TableColumnMetadata(val name: String, val sqlTypeName: String, val jdbcType: Int, val size: Int, val javaClassName: String, val isNullable: Boolean = false)

Represents a column in a database table to keep all required meta-information.

Constructors

Link copied to clipboard
constructor(name: String, sqlTypeName: String, jdbcType: Int, size: Int, javaClassName: String, isNullable: Boolean = false)

Properties

Link copied to clipboard

true for a multi-bit BIT(M) column, M > 1, in MySQL and MariaDB.

Link copied to clipboard

true if column could contain nulls.

Link copied to clipboard

the class name in Java.

Link copied to clipboard

the JDBC data type of the column produced from java.sql.Types.

Link copied to clipboard

the name of the DataFrame column: the SQL AS alias, or the column name when there is no alias, made unique within the result (see DbType.getTableColumnsMetadata).

Link copied to clipboard
val size: Int

the declared width of the column, as reported by java.sql.ResultSetMetaData.getColumnDisplaySize, or 0 when the driver does not report one. A few type mappings depend on it — it is what tells a BIT(1) column apart from a BIT(M) one in MySQL, MariaDB and PostgreSQL, where the driver reports identical metadata for both but returns values of different classes. A custom DbType branching on it should treat 0 as "unknown" rather than as a width.

Link copied to clipboard

the SQL data type of the column.

Functions

Link copied to clipboard
fun copy(name: String = this.name, sqlTypeName: String = this.sqlTypeName, jdbcType: Int = this.jdbcType, size: Int = this.size, javaClassName: String = this.javaClassName, isNullable: Boolean = this.isNullable): TableColumnMetadata

Creates a copy of the current TableColumnMetadata instance with optionally modified attributes.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String