Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-409

PrepareStatement.setObject(...) with java 8 temporal object not implemented

    XMLWordPrintable

    Details

      Description

      PrepareStatement.setObject(...) with java 8 temporal object is not implemented.
      Data for java 8 object are the object deserialization, not the temporal value.

      Workaround : convert with java 8 temporal object, like :
      LocalDate -> Date.valueOf((LocalDate) x)
      LocalDateTime -> Timestamp.valueOf((LocalDateTime) x)
      LocalTime -> Time.valueOf((LocalTime) x)

      Jdbc1.2 object type that must be map:

      Java Object Type JDBC Type
      String CHAR, VARCHAR, LONGVARCHAR, NCHAR,
      NVARCHAR or LONGNVARCHAR
      java.math.BigDecimal NUMERIC
      Boolean BIT or BOOLEAN
      Byte TINYINT
      Short SMALLINT
      Integer INTEGER
      Long BIGINT
      Float REAL
      Double DOUBLE
      byte[] BINARY, VARBINARY, or LONGVARBINARY
      java.math.BigInteger BIGINT
      java.sql.Date DATE
      java.sql.Time TIME
      java.sql.Timestamp TIMESTAMP
      java.sql.Clob CLOB
      java.sql.Blob BLOB
      java.sql.Array ARRAY
      java.sql.Struct STRUCT
      java.sql.Ref REF
      java.net.URL DATALINK
      java.sql.RowId ROWID
      java.sql.NClob NCLOB
      java.sql.SQLXML SQLXML
      java.util.Calendar TIMESTAMP
      java.util.Date TIMESTAMP
      java.time.LocalDate DATE
      java.time.LocalTime TIME
      java.time.LocalDateTime TIMESTAMP
      java.time.OffsetTime TIME_WITH_TIMEZONE
      java.time.OffsetDatetime TIMESTAMP_WITH_TIMEZONE

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              diego dupin Diego Dupin
              Reporter:
              diego dupin Diego Dupin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: