Top Description Methods
com.mysql.cj.protocol

public Interface ColumnDefinition

extends ProtocolEntity
Known Direct Subinterfaces
com.mysql.cj.jdbc.result.CachedResultSetMetaData
Known Direct Implementers
com.mysql.cj.result.DefaultColumnDefinition
Imports
java.util.Map, com.mysql.cj.result.Field

Represents protocol specific result set metadata, eg., for native protocol, Protocol::ColumnDefinition41 protocol entity.

Method Summary

Modifier and TypeMethod and Description
public void
buildIndexMapping()

Builds a hash between column names and their indices for fast retrieval.

public void
exportTo(ColumnDefinition columnDefinition)

public int
findColumn(String columnName, boolean useColumnNamesInFindColumn, int indexBase)

public Map<String, Integer>
public Map<String, Integer>
public Map<String, Integer>
public Field[]
public Map<String, Integer>
public boolean
public boolean

Returns:

true if fields with type BLOB, MEDIUMBLOB, LONGBLOB, TEXT, MEDIUMTEXT or LONGTEXT exist in this ColumnDefinition.
hasLargeFields
()

Check if fields with type BLOB, MEDIUMBLOB, LONGBLOB, TEXT, MEDIUMTEXT or LONGTEXT exist in this ColumnDefinition.

public void
initializeFrom(ColumnDefinition columnDefinition)

public void
setColumnLabelToIndex(Map<String, Integer> columnLabelToIndex)

public void
public void
setColumnToIndexCache(Map<String, Integer> columnToIndexCache)

public void
setFields(Field[] fields)

public void

Method Detail

buildIndexMappingback to summary
public void buildIndexMapping()

Builds a hash between column names and their indices for fast retrieval. This is done lazily to support findColumn() and get*(String), as it can be more expensive than just retrieving result set values by ordinal index.

exportToback to summary
public void exportTo(ColumnDefinition columnDefinition)
findColumnback to summary
public int findColumn(String columnName, boolean useColumnNamesInFindColumn, int indexBase)
getColumnLabelToIndexback to summary
public Map<String, Integer> getColumnLabelToIndex()
getColumnNameToIndexback to summary
public Map<String, Integer> getColumnNameToIndex()
getColumnToIndexCacheback to summary
public Map<String, Integer> getColumnToIndexCache()
getFieldsback to summary
public Field[] getFields()
getFullColumnNameToIndexback to summary
public Map<String, Integer> getFullColumnNameToIndex()
hasBuiltIndexMappingback to summary
public boolean hasBuiltIndexMapping()
hasLargeFieldsback to summary
public boolean hasLargeFields()

Check if fields with type BLOB, MEDIUMBLOB, LONGBLOB, TEXT, MEDIUMTEXT or LONGTEXT exist in this ColumnDefinition.

Returns:boolean

true if fields with type BLOB, MEDIUMBLOB, LONGBLOB, TEXT, MEDIUMTEXT or LONGTEXT exist in this ColumnDefinition.

initializeFromback to summary
public void initializeFrom(ColumnDefinition columnDefinition)
setColumnLabelToIndexback to summary
public void setColumnLabelToIndex(Map<String, Integer> columnLabelToIndex)
setColumnNameToIndexback to summary
public void setColumnNameToIndex(Map<String, Integer> colNameToIndex)
setColumnToIndexCacheback to summary
public void setColumnToIndexCache(Map<String, Integer> columnToIndexCache)
setFieldsback to summary
public void setFields(Field[] fields)
setFullColumnNameToIndexback to summary
public void setFullColumnNameToIndex(Map<String, Integer> fullColNameToIndex)