A default implementation for the ExecuteContext. @author Lukas Eder
| 106 | * @author Lukas Eder |
| 107 | */ |
| 108 | class DefaultExecuteContext implements ExecuteContext { |
| 109 | |
| 110 | private static final JooqLogger log = JooqLogger.getLogger(DefaultExecuteContext.class); |
| 111 | private static final JooqLogger logVersionSupport = JooqLogger.getLogger(DefaultExecuteContext.class, "logVersionSupport", 1); |
| 112 | private static final JooqLogger logDefaultDialect = JooqLogger.getLogger(DefaultExecuteContext.class, "logDefaultDialect", 1); |
| 113 | |
| 114 | // Persistent attributes (repeatable) |
| 115 | private final ConverterContext converterContext; |
| 116 | private final Instant creationTime; |
| 117 | private final Configuration originalConfiguration; |
| 118 | private final Configuration derivedConfiguration; |
| 119 | private final Map<Object, Object> data; |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | private Query query; |
| 129 | private final Routine<?> routine; |
| 130 | private String sql; |
| 131 | private Param<?>[] params; |
| 132 | private int skipUpdateCounts; |
| 133 | |
| 134 | private final BatchMode batchMode; |
| 135 | private Query[] batchQueries; |
| 136 | private String[] batchSQL; |
| 137 | private long[] batchRows; |
| 138 | |
| 139 | ConnectionProvider connectionProvider; |
| 140 | private Connection connection; |
| 141 | private Connection wrappedConnection; |
| 142 | private PreparedStatement statement; |
| 143 | private int statementExecutionCount; |
| 144 | private ResultSet resultSet; |
| 145 | private Record record; |
| 146 | private Result<?> result; |
| 147 | int recordLevel; |
| 148 | int resultLevel; |
| 149 | private long rows = -1; |
| 150 | private RuntimeException exception; |
| 151 | private SQLException sqlException; |
| 152 | private SQLWarning sqlWarning; |
| 153 | private String[] serverOutput; |
| 154 | |
| 155 | // ------------------------------------------------------------------------ |
| 156 | // XXX: Static utility methods for handling blob / clob lifecycle |
| 157 | // ------------------------------------------------------------------------ |
| 158 | |
| 159 | private static final ThreadLocal<List<AutoCloseable>> RESOURCES = new ThreadLocal<>(); |
| 160 | |
| 161 | /** |
| 162 | * Clean up blobs, clobs and the local configuration. |
| 163 | * <p> |
| 164 | * <h5>BLOBS and CLOBS</h5> |
| 165 | * <p> |
nothing calls this directly
no test coverage detected
searching dependent graphs…