Top Description Fields Constructors Methods
com.mysql.cj.jdbc.exceptions

public Class MysqlDataTruncation

extends DataTruncation
Class Inheritance
Imports
java.sql.DataTruncation

MySQL wrapper for DataTruncation until the server can support sending all needed information.

Field Summary

Modifier and TypeField and Description
private String
pack-priv static final long
private int

Constructor Summary

AccessConstructor and Description
public
MysqlDataTruncation(String
the message from the server
message
,
int
of column or parameter
index
,
boolean
was a parameter?
parameter
,
boolean
was truncated on read?
read
,
int
size requested
dataSize
,
int
size actually used
transferSize
,
int
MySQL error code
vendorErrorCode
)

Creates a new MysqlDataTruncation exception/warning.

Method Summary

Modifier and TypeMethod and Description
public int
getErrorCode()

Overrides java.sql.SQLException.getErrorCode.

Retrieves the vendor-specific exception code for this SQLException object.

public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Inherited from java.sql.DataTruncation:
getDataSizegetIndexgetParametergetReadgetTransferSize

Field Detail

messageback to summary
private String message
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides java.sql.DataTruncation.serialVersionUID.

vendorErrorCodeback to summary
private int vendorErrorCode

Constructor Detail

MysqlDataTruncationback to summary
public MysqlDataTruncation(String message, int index, boolean parameter, boolean read, int dataSize, int transferSize, int vendorErrorCode)

Creates a new MysqlDataTruncation exception/warning.

Parameters
message:String

the message from the server

index:int

of column or parameter

parameter:boolean

was a parameter?

read:boolean

was truncated on read?

dataSize:int

size requested

transferSize:int

size actually used

vendorErrorCode:int

MySQL error code

Method Detail

getErrorCodeback to summary
public int getErrorCode()

Overrides java.sql.SQLException.getErrorCode.

Doc from java.sql.SQLException.getErrorCode.

Retrieves the vendor-specific exception code for this SQLException object.

Returns:int

the vendor's error code

Annotations
@Override
getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Returns:String

the detail message string of this Throwable instance (which may be null).

Annotations
@Override