Package org.mariadb.jdbc.internal.util
Class LogQueryTool
- java.lang.Object
-
- org.mariadb.jdbc.internal.util.LogQueryTool
-
public class LogQueryTool extends Object
-
-
Constructor Summary
Constructors Constructor Description LogQueryTool(Options options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SQLExceptionexceptionWithQuery(String sql, SQLException sqlException, boolean explicitClosed)Return exception with query information's.SQLExceptionexceptionWithQuery(ByteBuffer buffer, SQLException sqlEx, boolean explicitClosed)Return exception with query information's.SQLExceptionexceptionWithQuery(SQLException sqlEx, PrepareResult prepareResult)Return exception with query information's.SQLExceptionexceptionWithQuery(ParameterHolder[] parameters, SQLException sqlEx, PrepareResult serverPrepareResult)Return exception with query information's.StringsubQuery(String sql)Get query, truncated if to big.
-
-
-
Constructor Detail
-
LogQueryTool
public LogQueryTool(Options options)
-
-
Method Detail
-
subQuery
public String subQuery(String sql)
Get query, truncated if to big.- Parameters:
sql- current query- 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
public SQLException exceptionWithQuery(SQLException sqlEx, PrepareResult prepareResult)
Return exception with query information's.- Parameters:
sqlEx- current exceptionprepareResult- prepare results- Returns:
- exception with query information
-
-