Class MysqlDataTruncation

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
java.sql.SQLWarning
java.sql.DataTruncation
com.mysql.cj.jdbc.exceptions.MysqlDataTruncation
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<java.lang.Throwable>

public class MysqlDataTruncation
extends java.sql.DataTruncation
MySQL wrapper for DataTruncation until the server can support sending all needed information.
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    MysqlDataTruncation​(java.lang.String message, int index, boolean parameter, boolean read, int dataSize, int transferSize, int vendorErrorCode)
    Creates a new MysqlDataTruncation exception/warning.
  • Method Summary

    Modifier and Type Method Description
    int getErrorCode()  
    java.lang.String getMessage()  

    Methods inherited from class java.sql.DataTruncation

    getDataSize, getIndex, getParameter, getRead, getTransferSize

    Methods inherited from class java.sql.SQLWarning

    getNextWarning, setNextWarning

    Methods inherited from class java.sql.SQLException

    getNextException, getSQLState, iterator, setNextException

    Methods inherited from class java.lang.Throwable

    addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • MysqlDataTruncation

      public MysqlDataTruncation​(java.lang.String message, int index, boolean parameter, boolean read, int dataSize, int transferSize, int vendorErrorCode)
      Creates a new MysqlDataTruncation exception/warning.
      Parameters:
      message - the message from the server
      index - of column or parameter
      parameter - was a parameter?
      read - was truncated on read?
      dataSize - size requested
      transferSize - size actually used
      vendorErrorCode - MySQL error code
  • Method Details

    • getErrorCode

      public int getErrorCode()
      Overrides:
      getErrorCode in class java.sql.SQLException
    • getMessage

      public java.lang.String getMessage()
      Overrides:
      getMessage in class java.lang.Throwable