public class TimestampType extends AbstractDateTimeType
For example, Encoding: If incoming literal is a string '2000-01-01 00:00:00' which has no timezone, it interpreted as text in local timezone and encoded with UTC; If incoming literal is a epoch millisecond, it interpreted as UTC epoch and encode with UTC if index / key or local timezone if proto
DataType.EncodeType| 限定符和类型 | 字段和说明 |
|---|---|
static MySQLType[] |
subTypes |
static TimestampType |
TIMESTAMP |
AutoIncrementFlag, BinaryFlag, BlobFlag, collation, COLUMN_VERSION_FLAG, decimal, EnumFlag, flag, length, MultipleKeyFlag, NoDefaultValueFlag, NotNullFlag, NumFlag, OnUpdateNowFlag, PriKeyFlag, SetFlag, TimestampFlag, tp, UniqueKeyFlag, UnsignedFlag, UNSPECIFIED_LEN, ZerofillFlag| 限定符和类型 | 方法和说明 |
|---|---|
protected Long |
decodeNotNull(int flag,
CodecDataInput cdi)
Decode timestamp from packed long value In TiDB / MySQL, timestamp type is converted to UTC and
stored
|
protected Timestamp |
decodeNotNullForBatchWrite(int flag,
CodecDataInput cdi) |
protected Object |
doConvertToTiDBType(Object value) |
protected void |
encodeProto(CodecDataOutput cdo,
Object value) |
String |
getName() |
org.joda.time.DateTime |
getOriginDefaultValueNonNull(String value,
long version)
get origin default value
|
org.joda.time.DateTimeZone |
getTimezone() |
encodeKey, encodeValue, getProtoExprTypeconvertToTiDBType, decode, decodeChunkColumn, decodeForBatchWrite, encode, encodeIndex, encodeKey, encodeMaxValue, encodeNull, equals, getCharset, getCollationCode, getDecimal, getDefaultLength, getElems, getFlag, getLength, getOriginDefaultValue, getSize, getType, getTypeCode, hashCode, isAutoIncrement, isBinary, isBlob, isDecimalUnSpecified, isEnum, isLengthUnSpecified, isLengthUnSpecified, isMultiKey, isNextNull, isNoDefault, isNotNull, isNum, isOnUpdateNow, isPrefixIndexSupported, isPrimaryKey, isPushDownSupported, isSameCatalog, isSet, isTimestamp, isUniqueKey, isUnsigned, isZeroFill, setCollation, signedLowerBound, signedUpperBound, toString, toTypeHolder, unsignedUpperBoundpublic static final TimestampType TIMESTAMP
public static final MySQLType[] subTypes
public org.joda.time.DateTimeZone getTimezone()
getTimezone 在类中 AbstractDateTimeTypeprotected Object doConvertToTiDBType(Object value) throws org.tikv.common.exception.ConvertNotSupportException, org.tikv.common.exception.ConvertOverflowException
doConvertToTiDBType 在类中 DataTypeorg.tikv.common.exception.ConvertNotSupportExceptionorg.tikv.common.exception.ConvertOverflowExceptionprotected Long decodeNotNull(int flag, CodecDataInput cdi)
decodeNotNull 在类中 DataTypeprotected Timestamp decodeNotNullForBatchWrite(int flag, CodecDataInput cdi)
decodeNotNullForBatchWrite 在类中 DataTypepublic org.joda.time.DateTime getOriginDefaultValueNonNull(String value, long version)
DataTypegetOriginDefaultValueNonNull 在类中 DataTypevalue - a int value represents in stringprotected void encodeProto(CodecDataOutput cdo, Object value)
encodeProto 在类中 AbstractDateTimeTypeCopyright © 2023 PingCAP. All rights reserved.