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 value
    `Object` | `encode​(Tuple input, int pos, JDBCColumnDescriptorProvider provider)` |
    `protected Object` | `encodeData​(io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor descriptor, Object javaValue)` | Convert any the parameter `Java` value except `encodeDateTime(JDBCColumnDescriptor, Object)` and `encodeSpecificVendorType(JDBCColumnDescriptor, Object)` to the `SQL value`
    `protected Object` | `encodeDateTime​(io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor descriptor, Object value)` | Convert the parameter `Java datetime` value to the `SQL datetime` value
    `protected Object` | `encodeSpecificVendorType​(io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor descriptor, Object javaValue)` | Convert the parameter `Java` value to the `specific SQL vendor data type`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JDBCEncoderImpl

          public JDBCEncoderImpl()

  - ### 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 interface `JDBCEncoder`
      Parameters:
        `input` - array input
        `pos` - column position
        `provider` - 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 interface `JDBCEncoder`
      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 parameter `Java datetime` value to the `SQL datetime` value
      Parameters:
        `descriptor` - the column descriptor
        `value` - 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 parameter `Java` value to the `specific SQL vendor data type`
      Parameters:
        `descriptor` - the column descriptor
        `javaValue` - 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 parameter `Java` value except `encodeDateTime(JDBCColumnDescriptor, Object)` and `encodeSpecificVendorType(JDBCColumnDescriptor, Object)` to the `SQL value`
      Parameters:
        `descriptor` - the column descriptor
        `javaValue` - the java value in parameter
      Returns:
        the compatible SQL value