类 Field
- java.lang.Object
-
- com.mysql.cj.result.Field
-
- 所有已实现的接口:
ProtocolEntity
public class Field extends Object implements ProtocolEntity
Field is a class used to describe fields in a ResultSet
-
-
构造器概要
构造器 构造器 说明 Field(LazyString databaseName, LazyString tableName, LazyString originalTableName, LazyString columnName, LazyString originalColumnName, long length, int mysqlTypeId, short colFlag, int colDecimals, int collationIndex, String encoding, MysqlType mysqlType)Field(String tableName, String columnName, int collationIndex, String encoding, MysqlType mysqlType, int length)Used by prepared statements to re-use result set data conversion methods when generating bound parameter retrieval instance for statement interceptors.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 intgetCollationIndex()StringgetColumnLabel()StringgetDatabaseName()intgetDecimals()StringgetEncoding()Returns the Java encoding for this field.shortgetFlags()StringgetFullName()intgetJavaType()longgetLength()MysqlTypegetMysqlType()intgetMysqlTypeId()StringgetName()StringgetOriginalName()StringgetOriginalTableName()StringgetTableName()booleangetValueNeedsQuoting()booleanisAutoIncrement()booleanisBinary()booleanisBlob()booleanisFromFunction()booleanisMultipleKey()booleanisNotNull()booleanisPrimaryKey()booleanisReadOnly()Is this field _definitely_ not writable?booleanisSingleBit()booleanisUniqueKey()booleanisUnsigned()booleanisZeroFill()voidsetBinary()voidsetBlob()voidsetFlags(short colFlag)voidsetMysqlType(MysqlType mysqlType)voidsetMysqlTypeId(int id)StringtoString()
-
-
-
构造器详细资料
-
Field
public Field(LazyString databaseName, LazyString tableName, LazyString originalTableName, LazyString columnName, LazyString originalColumnName, long length, int mysqlTypeId, short colFlag, int colDecimals, int collationIndex, String encoding, MysqlType mysqlType)
-
Field
public Field(String tableName, String columnName, int collationIndex, String encoding, MysqlType mysqlType, int length)
Used by prepared statements to re-use result set data conversion methods when generating bound parameter retrieval instance for statement interceptors.- 参数:
tableName- not usedcolumnName- not usedcollationIndex- the MySQL collation/character set indexencoding- encoding of data in this fieldmysqlType-MysqlTypelength- length in characters or bytes (for BINARY data).
-
-
方法详细资料
-
getEncoding
public String getEncoding()
Returns the Java encoding for this field.- 返回:
- the Java encoding
-
getColumnLabel
public String getColumnLabel()
-
getDatabaseName
public String getDatabaseName()
-
getDecimals
public int getDecimals()
-
getFullName
public String getFullName()
-
getLength
public long getLength()
-
getMysqlTypeId
public int getMysqlTypeId()
-
setMysqlTypeId
public void setMysqlTypeId(int id)
-
getName
public String getName()
-
getOriginalName
public String getOriginalName()
-
getOriginalTableName
public String getOriginalTableName()
-
getJavaType
public int getJavaType()
-
getTableName
public String getTableName()
-
isAutoIncrement
public boolean isAutoIncrement()
-
isBinary
public boolean isBinary()
-
setBinary
public void setBinary()
-
isBlob
public boolean isBlob()
-
setBlob
public void setBlob()
-
isMultipleKey
public boolean isMultipleKey()
-
isNotNull
public boolean isNotNull()
-
isPrimaryKey
public boolean isPrimaryKey()
-
isFromFunction
public boolean isFromFunction()
-
isReadOnly
public boolean isReadOnly()
Is this field _definitely_ not writable?- 返回:
- true if this field can not be written to in an INSERT/UPDATE statement.
-
isUniqueKey
public boolean isUniqueKey()
-
isUnsigned
public boolean isUnsigned()
-
isZeroFill
public boolean isZeroFill()
-
isSingleBit
public boolean isSingleBit()
-
getValueNeedsQuoting
public boolean getValueNeedsQuoting()
-
getCollationIndex
public int getCollationIndex()
-
getMysqlType
public MysqlType getMysqlType()
-
setMysqlType
public void setMysqlType(MysqlType mysqlType)
-
getFlags
public short getFlags()
-
setFlags
public void setFlags(short colFlag)
-
-