public class LogQueryTool
extends java.lang.Object
Constructor and Description |
---|
LogQueryTool(Options options) |
Modifier and Type | Method and Description |
---|---|
java.sql.SQLException |
exceptionWithQuery(java.nio.ByteBuffer buffer,
java.sql.SQLException sqlEx,
boolean explicitClosed)
Return exception with query information's.
|
java.sql.SQLException |
exceptionWithQuery(ParameterHolder[] parameters,
java.sql.SQLException sqlEx,
PrepareResult serverPrepareResult)
Return exception with query information's.
|
java.sql.SQLException |
exceptionWithQuery(java.sql.SQLException sqlEx,
PrepareResult prepareResult)
Return exception with query information's.
|
java.sql.SQLException |
exceptionWithQuery(java.lang.String sql,
java.sql.SQLException sqlException,
boolean explicitClosed)
Return exception with query information's.
|
private java.lang.String |
exWithQuery(java.lang.String message,
PrepareResult serverPrepareResult,
ParameterHolder[] parameters)
Return exception message with query.
|
private java.lang.String |
subQuery(java.nio.ByteBuffer buffer)
Get query, truncated if to big.
|
java.lang.String |
subQuery(java.lang.String sql)
Get query, truncated if to big.
|
private final Options options
public LogQueryTool(Options options)
public java.lang.String subQuery(java.lang.String sql)
sql
- current queryprivate java.lang.String subQuery(java.nio.ByteBuffer buffer)
buffer
- current query bufferpublic java.sql.SQLException exceptionWithQuery(java.lang.String sql, java.sql.SQLException sqlException, boolean explicitClosed)
sql
- current sql commandsqlException
- current exceptionexplicitClosed
- has connection been explicitly closedpublic java.sql.SQLException exceptionWithQuery(java.nio.ByteBuffer buffer, java.sql.SQLException sqlEx, boolean explicitClosed)
buffer
- query buffersqlEx
- current exceptionexplicitClosed
- has connection been explicitly closedpublic java.sql.SQLException exceptionWithQuery(ParameterHolder[] parameters, java.sql.SQLException sqlEx, PrepareResult serverPrepareResult)
parameters
- query parameterssqlEx
- current exceptionserverPrepareResult
- prepare resultspublic java.sql.SQLException exceptionWithQuery(java.sql.SQLException sqlEx, PrepareResult prepareResult)
sqlEx
- current exceptionprepareResult
- prepare resultsprivate java.lang.String exWithQuery(java.lang.String message, PrepareResult serverPrepareResult, ParameterHolder[] parameters)
message
- current exception messageserverPrepareResult
- prepare resultparameters
- query parameters