io.vertx.ext.jdbc.spi

## Interface JDBCEncoder

-     public interface JDBCEncoder

  Represents for JDBC encoder from Java value to SQL value

  The default encoder provides the best efforts to convert `Java type` to `SQL type` as `JDBC 4.2` spec.

  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 and Description
    --- | ---
    `Object` | `encode(JsonArray input, int pos, JDBCColumnDescriptorProvider provider)` Convert Java input value to SQL value

- - ### Method Detail

    - #### encode

          Object encode(JsonArray input,
                        int pos,
                        JDBCColumnDescriptorProvider provider)
                 throws SQLException

      Convert Java input value to SQL value
      Parameters:
        `input` - array input
        `pos` - column position
        `provider` - JDBCType provider
      Returns:
        SQL value
      Throws:
        `SQLException` - if any error when convert
      See Also:
        `JDBCColumnDescriptorProvider`

Copyright © 2022 Eclipse. All rights reserved.