Supported parameter types
https://gyazo.com/c5a54e42fa7375ac79471952da4e2314
The following table depicts supported parameter types.
/yuunkjm/--.icon
Primitive type
table:list
type set value to PreparedStatement by Typical JDBC Type
boolean setBoolean BOOLEAN
byte setByte TINYINT
short setShort SMALLINT
int setInt INTEGER
long setLong BINGINT
char setString VARCHAR
float setFloat REAL
double setDouble DOBULE
/yuunkjm/--.icon
Class
java.util.Date is not recommended. It is recommended to use java.time.LocalDateTime instead.
It is recommended to use java.time.LocalTime, java.time.LocalDate, java.time.LocalDateTime instead of java.sql.Time, java.sql.Date, java.sql.Timestamp.
table:list
type set value to PreparedStatement by Typical JDBC Type
java.lang.Boolean setBoolean BOOLEAN
java.lang.Byte setByte TINYINT
java.lang.Short setShort SMALLINT
java.lang.Integer setInt INTEGER
java.lang.Long setLong BIGINT
java.lang.Character setString VARCHAR
java.lang.Float setFloat REAL
java.lang.Double setDouble DOUBLE
java.lang.String setString VARCHAR
java.math.BigDecimal setBigDecimal DECIMAL
java.sql.Date setDate DATE
java.sql.Time setTime TIME
java.sql.Timestamp setObject TIMESTAMP
java.time.LocalDate setObject DATE
java.time.LocalDateTime setObject TIMESTAMP
java.time.LocalTime setObject TIME
java.time.OffsetTime setObject TIME_WITH_TIMEZONE
java.time.OffsetDateTime setObject TIMESTAMP_WITH_TIMEZONE
java.util.Date setObject TIMESTAMP
java.util.UUID setObject VARCHAR
/yuunkjm/--.icon
Blob/Clob/InputStream/Reader
An instance of java.sql.Blob, java.sql.Clob, java.io.InputStream, java.io.Reader (including subclass) are supported.
table:list
type set value to PreparedStatement by Typical JDBC Type
java.sql.Blob setBlob BLOB
java.sql.Clob setClob CLOB
java.io.InputStream setBinaryStream LONGVARBINARY
java.io.Reader setCharacterStream LONGVARCHAR
/yuunkjm/--.icon
Enum
Subclass of Enum is treated as String.
table:list
type set value to PreparedStatement by Typical JDBC Type
java.lang.Enum setString after Enum#name() VARCHAR
/yuunkjm/--.icon
Array
table: Java arrays (It should be stored as SQL arrays)
type set value to PreparedStatement by Typical JDBC Type
byte[] setBytes VARBINARY
other primitive type convert to boxed type and setArray (JDBC driver is responsible for mapping) -
other type setArray (JDBC driver is responsible for mapping) -
/yuunkjm/--.icon
Other object
Other object is set by setObject