codecamp

HasorDB 类型处理器

确定一个类型处理器的顺序如下:

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

类型处理器(交叉)

下面表格中 JAVA类型JDBC 必须全部满足才能选择对应的 ​类型处理器​,也是第一优先级。

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


HasorDB JDBC Type
HasorDB 处理枚举类型
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }