HasorDB 類型處理器

2021-12-29 14:02 更新

確定一個類型處理器的順序如下:

  • 1st ?Java ?+ ?Jdbc?
  • 2st ?Java?
  • 3st ?Jdbc?
  • 4st 使用 ?UnknownTypeHandler?

類型處理器(交叉)

下面表格中 JAVA類型JDBC 必須全部滿足才能選擇對應的 ?類型處理器?,也是第一優(yōu)先級。

JDBC 類型 Java 類型 類型處理器
Types.CHARTypes.VARCHARTypes.LONGVARCHARTypes.NCHARTypes.NVARCHARTypes.LONGNVARCHAR java.time.MonthDay MonthDayOfStringTypeHandler
Types.CHARTypes.VARCHARTypes.LONGVARCHARTypes.NCHARTypes.NVARCHARTypes.LONGNVARCHAR java.time.YearMonth YearMonthOfStringTypeHandler
Types.CHARTypes.VARCHARTypes.LONGVARCHARTypes.NCHARTypes.NVARCHARTypes.LONGNVARCHAR java.time.Year YearOfStringTypeHandler
Types.CHARTypes.VARCHARTypes.LONGVARCHARTypes.NCHARTypes.NVARCHARTypes.LONGNVARCHAR java.time.Month MonthOfStringTypeHandler
Types.CHARTypes.VARCHARTypes.LONGVARCHAR java.lang.String StringTypeHandler
Types.CHARTypes.VARCHARTypes.LONGVARCHAR java.io.Reader StringReaderTypeHandler
Types.NCHARTypes.NVARCHARTypes.LONGNVARCHAR java.lang.String NStringTypeHandler
Types.NCHARTypes.NVARCHARTypes.LONGNVARCHAR java.io.Reader NStringReaderTypeHandler
Types.TINYINTTypes.SMALLINTTypes.INTEGERTypes.BIGINTTypes.FLOATTypes.DOUBLETypes.REALTypes.NUMERICTypes.DECIMAL java.time.MonthDay MonthDayOfNumberTypeHandler
Types.TINYINTTypes.SMALLINTTypes.INTEGERTypes.BIGINTTypes.FLOATTypes.DOUBLETypes.REALTypes.NUMERICTypes.DECIMAL java.time.YearMonth YearMonthOfNumberTypeHandler
Types.TINYINTTypes.SMALLINTTypes.INTEGERTypes.BIGINTTypes.FLOATTypes.DOUBLETypes.REALTypes.NUMERICTypes.DECIMAL java.time.Year YearOfNumberTypeHandler
Types.TINYINTTypes.SMALLINTTypes.INTEGERTypes.BIGINTTypes.FLOATTypes.DOUBLETypes.REALTypes.NUMERICTypes.DECIMAL java.time.Month MonthOfNumberTypeHandler
Types.CLOB java.lang.String ClobTypeHandler
Types.NCLOB java.lang.String NClobTypeHandler
Types.CLOB java.io.Reader ClobReaderTypeHandler
Types.NCLOB java.io.Reader NClobReaderTypeHandler
Types.SQLXML java.lang.String SqlXmlTypeHandler
Types.SQLXML java.io.Reader SqlXmlForReaderTypeHandler
Types.SQLXML java.io.InputStream SqlXmlForInputStreamTypeHandler
Types.BINARYTypes.VARBINARYTypes.LONGVARBINARY byte[] BytesTypeHandler
Types.BINARYTypes.VARBINARYTypes.LONGVARBINARY java.lang.Byte[] BytesForWrapTypeHandler
Types.BINARYTypes.VARBINARYTypes.LONGVARBINARY java.io.InputStream BytesInputStreamTypeHandler
Types.BLOB byte[] BlobBytesTypeHandler
Types.BINARYTypes.VARBINARYTypes.LONGVARBINARYTypes.BLOB java.lang.Byte[] BlobBytesForWrapTypeHandler
Types.BLOB java.io.InputStream BlobInputStreamTypeHandler
Types.ARRAY java.lang.Object ArrayTypeHandler

類型處理器?

下面表格中 JAVA類型 JDBC 只需滿足任意一個,即可激活對應的 ?類型處理器?

JDBC 類型 Java 類型 類型處理器
Types.BITTypes.BOOLEAN java.lang.Booleanboolean BooleanTypeHandler
Types.TINYINT java.lang.Bytebyte ByteTypeHandler
Types.SMALLINT java.lang.Shortshort ShortTypeHandler
Types.INTEGER java.lang.Integerint IntegerTypeHandler
Types.BIGINT java.lang.Longlong LongTypeHandler
Types.FLOAT java.lang.Floatfloat FloatTypeHandler
Types.DOUBLE java.lang.Doubledouble DoubleTypeHandler
Types.CHAR java.lang.Characterchar CharacterTypeHandler
Types.NCHAR - NCharacterTypeHandler
Types.TIMESTAMP java.util.Date DateTypeHandler
Types.DATE - DateOnlyTypeHandler
- java.sql.Date SqlDateTypeHandler
- java.sql.Timestamp SqlTimestampTypeHandler
- java.sql.Time SqlTimeTypeHandler
Types.TIME - TimeOnlyTypeHandler
- java.time.Instant InstantTypeHandler
- java.time.chrono.JapaneseDate JapaneseDateTypeHandler
- java.time.Year YearOfTimeTypeHandler
- java.time.Month MonthOfTimeTypeHandler
- java.time.YearMonth YearMonthOfTimeTypeHandler
- java.time.MonthDay MonthDayOfTimeTypeHandler
- java.time.LocalDate LocalDateTypeHandler
- java.time.LocalTime LocalTimeTypeHandler
- java.time.LocalDateTime LocalDateTimeTypeHandler
- java.time.ZonedDateTime ZonedDateTimeTypeHandler
- java.time.OffsetDateTime OffsetDateTimeForUTCTypeHandler
- java.time.OffsetTime OffsetTimeForUTCTypeHandler
Types.TIME_WITH_TIMEZONE - OffsetTimeForSqlTypeHandler
Types.TIMESTAMP_WITH_TIMEZONE - OffsetDateTimeForSqlTypeHandler
Types.VARCHARTypes.LONGVARCHAR java.lang.String StringTypeHandler
Types.NVARCHARTypes.LONGNVARCHAR - NStringTypeHandler
- java.math.BigInteger BigIntegerTypeHandler
Types.REALTypes.NUMERICTypes.DECIMAL java.math.BigDecimal BigDecimalTypeHandler
- java.io.Reader StringReaderTypeHandler
- java.io.InputStream BytesInputStreamTypeHandler
- java.lang.Byte[] BytesForWrapTypeHandler
Types.BINARYTypes.VARBINARYTypes.LONGVARBINARY byte[] BytesTypeHandler
- java.lang.Number NumberTypeHandler
Types.CLOB java.sql.Clob ClobTypeHandler
Types.NCLOB java.sql.NClob NClobTypeHandler
Types.BLOB java.sql.Blob BlobBytesTypeHandler
Types.OTHER java.lang.Object UnknownTypeHandler
Types.ARRAY java.lang.Object[] ArrayTypeHandler
Types.SQLXML - SqlXmlTypeHandler
Types.JAVA_OBJECT - ObjectTypeHandler


以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號