Package org.mariadb.jdbc.internal.util
Class LogQueryTool
java.lang.Object
org.mariadb.jdbc.internal.util.LogQueryTool
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexceptionWithQuery
(String sql, SQLException sqlException, boolean explicitClosed) Return exception with query information's.exceptionWithQuery
(ByteBuffer buffer, SQLException sqlEx, boolean explicitClosed) Return exception with query information's.exceptionWithQuery
(SQLException sqlEx, PrepareResult prepareResult) Return exception with query information's.exceptionWithQuery
(ParameterHolder[] parameters, SQLException sqlEx, PrepareResult serverPrepareResult) Return exception with query information's.private String
exWithQuery
(String message, PrepareResult serverPrepareResult, ParameterHolder[] parameters) Return exception message with query.Get query, truncated if to big.private String
subQuery
(ByteBuffer buffer) Get query, truncated if to big.
-
Field Details
-
options
-
-
Constructor Details
-
LogQueryTool
-
-
Method Details
-
subQuery
Get query, truncated if to big.- Parameters:
sql
- current query- Returns:
- possibly truncated query if too big
-
subQuery
Get query, truncated if to big.- Parameters:
buffer
- current query buffer- Returns:
- possibly truncated query if too big
-
exceptionWithQuery
public SQLException exceptionWithQuery(String sql, SQLException sqlException, boolean explicitClosed) Return exception with query information's.- Parameters:
sql
- current sql commandsqlException
- current exceptionexplicitClosed
- has connection been explicitly closed- Returns:
- exception with query information
-
exceptionWithQuery
public SQLException exceptionWithQuery(ByteBuffer buffer, SQLException sqlEx, boolean explicitClosed) Return exception with query information's.- Parameters:
buffer
- query buffersqlEx
- current exceptionexplicitClosed
- has connection been explicitly closed- Returns:
- exception with query information
-
exceptionWithQuery
public SQLException exceptionWithQuery(ParameterHolder[] parameters, SQLException sqlEx, PrepareResult serverPrepareResult) Return exception with query information's.- Parameters:
parameters
- query parameterssqlEx
- current exceptionserverPrepareResult
- prepare results- Returns:
- exception with query information
-
exceptionWithQuery
Return exception with query information's.- Parameters:
sqlEx
- current exceptionprepareResult
- prepare results- Returns:
- exception with query information
-
exWithQuery
private String exWithQuery(String message, PrepareResult serverPrepareResult, ParameterHolder[] parameters) Return exception message with query.- Parameters:
message
- current exception messageserverPrepareResult
- prepare resultparameters
- query parameters- Returns:
- exception message with query
-