Top Description Fields Constructors Methods
com.mysql.cj.result

public Class DefaultColumnDefinition

extends Object
implements ColumnDefinition
Class Inheritance
All Implemented Interfaces
com.mysql.cj.protocol.ColumnDefinition, com.mysql.cj.protocol.ProtocolEntity
Known Direct Subclasses
com.mysql.cj.jdbc.result.CachedResultSetMetaDataImpl
Imports
java.util.HashMap, .Map, .TreeMap, com.mysql.cj.protocol.ColumnDefinition

Protocol::ColumnDefinition41 object

Field Summary

Modifier and TypeField and Description
private boolean
private Map<String, Integer>
columnLabelToIndex

Map column names (and all of their permutations) to column indices

private Map<String, Integer>
columnNameToIndex

Map column names (and all of their permutations) to column indices

private Map<String, Integer>
columnToIndexCache

The above map is a case-insensitive tree-map, it can be slow, this caches lookups into that map, because the other alternative is to create new object instances for every call to findColumn()....

protected Field[]
private Map<String, Integer>
fullColumnNameToIndex

Map of fully-specified column names to column indices

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
buildIndexMapping()

Implements com.mysql.cj.protocol.ColumnDefinition.buildIndexMapping.

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

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

Implements com.mysql.cj.protocol.ColumnDefinition.findColumn.

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 this ColumnDefinition has large fields
hasLargeFields
()

Implements com.mysql.cj.protocol.ColumnDefinition.hasLargeFields.

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

public void
public void
public void
public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

builtIndexMappingback to summary
private boolean builtIndexMapping
columnLabelToIndexback to summary
private Map<String, Integer> columnLabelToIndex

Map column names (and all of their permutations) to column indices

columnNameToIndexback to summary
private Map<String, Integer> columnNameToIndex

Map column names (and all of their permutations) to column indices

columnToIndexCacheback to summary
private Map<String, Integer> columnToIndexCache

The above map is a case-insensitive tree-map, it can be slow, this caches lookups into that map, because the other alternative is to create new object instances for every call to findColumn()....

fieldsback to summary
protected Field[] fields
fullColumnNameToIndexback to summary
private Map<String, Integer> fullColumnNameToIndex

Map of fully-specified column names to column indices

Constructor Detail

DefaultColumnDefinitionback to summary
public DefaultColumnDefinition()
DefaultColumnDefinitionback to summary
public DefaultColumnDefinition(Field[] fields)

Method Detail

buildIndexMappingback to summary
public void buildIndexMapping()

Implements com.mysql.cj.protocol.ColumnDefinition.buildIndexMapping.

Doc from com.mysql.cj.protocol.ColumnDefinition.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.

Annotations
@Override
exportToback to summary
public void exportTo(ColumnDefinition columnDefinition)

Implements com.mysql.cj.protocol.ColumnDefinition.exportTo.

Annotations
@Override
findColumnback to summary
public int findColumn(String columnName, boolean useColumnNamesInFindColumn, int indexBase)

Implements com.mysql.cj.protocol.ColumnDefinition.findColumn.

Annotations
@Override
getColumnLabelToIndexback to summary
public Map<String, Integer> getColumnLabelToIndex()

Implements com.mysql.cj.protocol.ColumnDefinition.getColumnLabelToIndex.

Annotations
@Override
getColumnNameToIndexback to summary
public Map<String, Integer> getColumnNameToIndex()

Implements com.mysql.cj.protocol.ColumnDefinition.getColumnNameToIndex.

Annotations
@Override
getColumnToIndexCacheback to summary
public Map<String, Integer> getColumnToIndexCache()

Implements com.mysql.cj.protocol.ColumnDefinition.getColumnToIndexCache.

Annotations
@Override
getFieldsback to summary
public Field[] getFields()

Implements com.mysql.cj.protocol.ColumnDefinition.getFields.

Annotations
@Override
getFullColumnNameToIndexback to summary
public Map<String, Integer> getFullColumnNameToIndex()

Implements com.mysql.cj.protocol.ColumnDefinition.getFullColumnNameToIndex.

Annotations
@Override
hasBuiltIndexMappingback to summary
public boolean hasBuiltIndexMapping()

Implements com.mysql.cj.protocol.ColumnDefinition.hasBuiltIndexMapping.

Annotations
@Override
hasLargeFieldsback to summary
public boolean hasLargeFields()

Implements com.mysql.cj.protocol.ColumnDefinition.hasLargeFields.

Check if fields with type BLOB, MEDIUMBLOB, LONGBLOB, TEXT, MEDIUMTEXT, LONGTEXT, or VECTOR exist in this ColumnDefinition. This check is used for making a decision about whether we want to force a buffer row (better for rows with large fields).

Returns:boolean

true if this ColumnDefinition has large fields

Annotations
@Override
initializeFromback to summary
public void initializeFrom(ColumnDefinition columnDefinition)

Implements com.mysql.cj.protocol.ColumnDefinition.initializeFrom.

Annotations
@Override
setColumnLabelToIndexback to summary
public void setColumnLabelToIndex(Map<String, Integer> columnLabelToIndex)

Implements com.mysql.cj.protocol.ColumnDefinition.setColumnLabelToIndex.

Annotations
@Override
setColumnNameToIndexback to summary
public void setColumnNameToIndex(Map<String, Integer> colNameToIndex)

Implements com.mysql.cj.protocol.ColumnDefinition.setColumnNameToIndex.

Annotations
@Override
setColumnToIndexCacheback to summary
public void setColumnToIndexCache(Map<String, Integer> columnToIndexCache)

Implements com.mysql.cj.protocol.ColumnDefinition.setColumnToIndexCache.

Annotations
@Override
setFieldsback to summary
public void setFields(Field[] fields)

Implements com.mysql.cj.protocol.ColumnDefinition.setFields.

Annotations
@Override
setFullColumnNameToIndexback to summary
public void setFullColumnNameToIndex(Map<String, Integer> fullColNameToIndex)

Implements com.mysql.cj.protocol.ColumnDefinition.setFullColumnNameToIndex.

Annotations
@Override