public static class StatementsTest.QueryInfoQueryInterceptor extends BaseQueryInterceptor
| Modifier and Type | Field and Description |
|---|---|
private static java.util.List<java.lang.String> |
capturedSql |
private static boolean |
enabled |
| Constructor and Description |
|---|
QueryInfoQueryInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertCapturedSql(java.lang.String testCase,
java.lang.String... expectedSql) |
<T extends Resultset> |
preProcess(java.util.function.Supplier<java.lang.String> sql,
Query interceptedQuery)
Called before the given query is going to be sent to the server for processing.
|
static void |
startCapturing() |
destroy, executeTopLevelOnly, init, postProcessclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpostProcess, preProcessprivate static boolean enabled
private static java.util.List<java.lang.String> capturedSql
public static void startCapturing()
public static void assertCapturedSql(java.lang.String testCase,
java.lang.String... expectedSql)
public <T extends Resultset> T preProcess(java.util.function.Supplier<java.lang.String> sql, Query interceptedQuery)
QueryInterceptorResultset), and if so,
the server will not execute the query, and the given result set will be
returned to the application instead.
This method will be called while the connection-level mutex is held, so
it will only be called from one thread at a time.preProcess in interface QueryInterceptorpreProcess in class BaseQueryInterceptorT - Resultset objectsql - the Supplier for SQL representation of the queryinterceptedQuery - the actual Query instance being interceptedResultset that should be returned to the application instead
of results that are created from actual execution of the intercepted
query.