Package io.vertx.jdbcclient.spi
Interface JDBCEncoder
-
- All Known Implementing Classes:
JDBCEncoderImpl
public interface JDBCEncoderRepresents for JDBC encoder from Java value to SQL valueThe default encoder provides the best efforts to convert
Java typetoSQL typeasJDBC 4.2spec.You can replace it to adapt to a specific SQL driver by creating your owns then includes in the SPI file (
META-INF/services/io.vertx.ext.jdbc.spi.JDBCEncoder)- Since:
- 4.2.0
- See Also:
- Mapping of java.sql.Types to SQL types,
JDBCEncoderImpl,JDBCType,SQLType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Objectencode(JsonArray input, int pos, JDBCColumnDescriptorProvider provider)Convert Java input value to SQL valueObjectencode(Tuple input, int pos, JDBCColumnDescriptorProvider provider)
-
-
-
Method Detail
-
encode
Object encode(JsonArray input, int pos, JDBCColumnDescriptorProvider provider) throws SQLException
Convert Java input value to SQL value- Parameters:
input- array inputpos- column positionprovider- JDBCType provider- Returns:
- SQL value
- Throws:
SQLException- if any error when convert- See Also:
JDBCColumnDescriptorProvider
-
encode
Object encode(Tuple input, int pos, JDBCColumnDescriptorProvider provider) throws SQLException
- Throws:
SQLException
-
-