long now = system.now();
Connection connection = dbSession.getConnection();
try (PreparedStatement stmt = connection.prepareStatement(
- "INSERT INTO ce_scanner_context (task_uuid, created_at, updated_at, data) VALUES (?, ?, ?, ?)");
+ "INSERT INTO ce_scanner_context (task_uuid, created_at, updated_at, context_data) VALUES (?, ?, ?, ?)");
InputStream inputStream = new LogsIteratorInputStream(scannerContextLines, UTF_8)) {
stmt.setString(1, taskUuid);
stmt.setLong(2, now);
* whichever the platform SQ is running on ({@see LogsIteratorInputStream}).
*/
public Optional<String> selectScannerContext(DbSession dbSession, String taskUuid) {
- try (PreparedStatement stmt = dbSession.getConnection().prepareStatement("select data from ce_scanner_context where task_uuid=?")) {
+ try (PreparedStatement stmt = dbSession.getConnection().prepareStatement("select context_data from ce_scanner_context where task_uuid=?")) {
stmt.setString(1, taskUuid);
try (ResultSet rs = stmt.executeQuery()) {
if (rs.next()) {
long now = system.now();
Connection connection = dbSession.getConnection();
try (PreparedStatement stmt = connection.prepareStatement(
- "INSERT INTO ce_task_input (task_uuid, created_at, updated_at, data) VALUES (?, ?, ?, ?)")) {
+ "INSERT INTO ce_task_input (task_uuid, created_at, updated_at, input_data) VALUES (?, ?, ?, ?)")) {
stmt.setString(1, taskUuid);
stmt.setLong(2, now);
stmt.setLong(3, now);
ResultSet rs = null;
DataStream result = null;
try {
- stmt = dbSession.getConnection().prepareStatement("SELECT data FROM ce_task_input WHERE task_uuid=? AND data IS NOT NULL");
+ stmt = dbSession.getConnection().prepareStatement("SELECT input_data FROM ce_task_input WHERE task_uuid=? AND input_data IS NOT NULL");
stmt.setString(1, taskUuid);
rs = stmt.executeQuery();
if (rs.next()) {
context.execute(
new CreateTableBuilder(getDialect(), "ce_task_input")
.addPkColumn(newVarcharColumnDefBuilder().setColumnName("task_uuid").setLimit(UUID_SIZE).setIsNullable(false).build())
- .addColumn(newBlobColumnDefBuilder().setColumnName("data").setIsNullable(true).build())
+ .addColumn(newBlobColumnDefBuilder().setColumnName("input_data").setIsNullable(true).build())
.addColumn(newBigIntegerColumnDefBuilder().setColumnName("created_at").setIsNullable(false).build())
.addColumn(newBigIntegerColumnDefBuilder().setColumnName("updated_at").setIsNullable(false).build())
.build());
context.execute(
new CreateTableBuilder(getDialect(), "ce_scanner_context")
.addPkColumn(newVarcharColumnDefBuilder().setColumnName("task_uuid").setLimit(UUID_SIZE).setIsNullable(false).build())
- .addColumn(newBlobColumnDefBuilder().setColumnName("data").setIsNullable(false).build())
+ .addColumn(newBlobColumnDefBuilder().setColumnName("context_data").setIsNullable(false).build())
.addColumn(newBigIntegerColumnDefBuilder().setColumnName("created_at").setIsNullable(false).build())
.addColumn(newBigIntegerColumnDefBuilder().setColumnName("updated_at").setIsNullable(false).build())
.build());
CREATE TABLE "CE_TASK_INPUT" (
"TASK_UUID" VARCHAR(40) NOT NULL PRIMARY KEY,
- "DATA" BLOB(167772150),
+ "INPUT_DATA" BLOB(167772150),
"CREATED_AT" BIGINT NOT NULL,
"UPDATED_AT" BIGINT NOT NULL
);
CREATE TABLE "CE_SCANNER_CONTEXT" (
"TASK_UUID" VARCHAR(40) NOT NULL PRIMARY KEY,
- "DATA" BLOB(167772150) NOT NULL,
+ "CONTEXT_DATA" BLOB(167772150) NOT NULL,
"CREATED_AT" BIGINT NOT NULL,
"UPDATED_AT" BIGINT NOT NULL
);
assertThat(dbTester.countRowsOfTable(TABLE_CE_TASK_INPUT)).isEqualTo(0);
dbTester.assertColumnDefinition(TABLE_CE_TASK_INPUT, "task_uuid", Types.VARCHAR, 40, false);
- dbTester.assertColumnDefinition(TABLE_CE_TASK_INPUT, "data", Types.BLOB, null, true);
+ dbTester.assertColumnDefinition(TABLE_CE_TASK_INPUT, "input_data", Types.BLOB, null, true);
dbTester.assertColumnDefinition(TABLE_CE_TASK_INPUT, "created_at", Types.BIGINT, null, false);
dbTester.assertColumnDefinition(TABLE_CE_TASK_INPUT, "updated_at", Types.BIGINT, null, false);
dbTester.assertPrimaryKey(TABLE_CE_TASK_INPUT, "pk_" + TABLE_CE_TASK_INPUT, "task_uuid");
assertThat(dbTester.countRowsOfTable(TABLE_CE_SCANNER_CONTEXT)).isEqualTo(0);
dbTester.assertColumnDefinition(TABLE_CE_SCANNER_CONTEXT, "task_uuid", Types.VARCHAR, 40, false);
- dbTester.assertColumnDefinition(TABLE_CE_SCANNER_CONTEXT, "data", Types.BLOB, null, false);
+ dbTester.assertColumnDefinition(TABLE_CE_SCANNER_CONTEXT, "context_data", Types.BLOB, null, false);
dbTester.assertColumnDefinition(TABLE_CE_SCANNER_CONTEXT, "created_at", Types.BIGINT, null, false);
dbTester.assertColumnDefinition(TABLE_CE_SCANNER_CONTEXT, "updated_at", Types.BIGINT, null, false);
dbTester.assertPrimaryKey(TABLE_CE_SCANNER_CONTEXT, "pk_" + TABLE_CE_SCANNER_CONTEXT, "task_uuid");