Package io.vertx.jdbcclient.spi
Class JDBCEncoderImpl
- java.lang.Object
-
- io.vertx.jdbcclient.spi.JDBCEncoderImpl
-
- All Implemented Interfaces:
JDBCEncoder
public class JDBCEncoderImpl extends Object implements JDBCEncoder
-
-
Constructor Summary
Constructors Constructor Description JDBCEncoderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
doEncode(io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor descriptor, Object javaValue)
Object
encode(JsonArray input, int pos, JDBCColumnDescriptorProvider provider)
Convert Java input value to SQL valueObject
encode(Tuple input, int pos, JDBCColumnDescriptorProvider provider)
protected Object
encodeData(io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor descriptor, Object javaValue)
Convert any the parameterJava
value exceptencodeDateTime(JDBCColumnDescriptor, Object)
andencodeSpecificVendorType(JDBCColumnDescriptor, Object)
to theSQL value
protected Object
encodeDateTime(io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor descriptor, Object value)
Convert the parameterJava datetime
value to theSQL datetime
valueprotected Object
encodeSpecificVendorType(io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor descriptor, Object javaValue)
Convert the parameterJava
value to thespecific SQL vendor data type
-
-
-
Method Detail
-
encode
public Object encode(JsonArray input, int pos, JDBCColumnDescriptorProvider provider) throws SQLException
Description copied from interface:JDBCEncoder
Convert Java input value to SQL value- Specified by:
encode
in interfaceJDBCEncoder
- Parameters:
input
- array inputpos
- column positionprovider
- JDBCType provider- Returns:
- SQL value
- Throws:
SQLException
- if any error when convert- See Also:
JDBCColumnDescriptorProvider
-
encode
public Object encode(Tuple input, int pos, JDBCColumnDescriptorProvider provider) throws SQLException
- Specified by:
encode
in interfaceJDBCEncoder
- Throws:
SQLException
-
doEncode
public Object doEncode(io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor descriptor, Object javaValue)
-
encodeDateTime
protected Object encodeDateTime(io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor descriptor, Object value)
Convert the parameterJava datetime
value to theSQL datetime
value- Parameters:
descriptor
- the column descriptorvalue
- the java value in parameter- Returns:
- the compatible SQL value
-
encodeSpecificVendorType
protected Object encodeSpecificVendorType(io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor descriptor, Object javaValue)
Convert the parameterJava
value to thespecific SQL vendor data type
- Parameters:
descriptor
- the column descriptorjavaValue
- the java value in parameter- Returns:
- the compatible SQL value
-
encodeData
protected Object encodeData(io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor descriptor, Object javaValue)
Convert any the parameterJava
value exceptencodeDateTime(JDBCColumnDescriptor, Object)
andencodeSpecificVendorType(JDBCColumnDescriptor, Object)
to theSQL value
- Parameters:
descriptor
- the column descriptorjavaValue
- the java value in parameter- Returns:
- the compatible SQL value
-
-