@Test(expected = IllegalStateException.class) public void testIncorrectColumnDataType() throws Exception { Row row = new Row( TABLE, ImmutableMap.of( ID_COLUMN, createColumn(ID_COLUMN, ColumnDataType.LONGLONG, true, 1L, 0), NAME_COLUMN, createColumn(NAME_COLUMN, ColumnDataType.VARCHAR, false, "bob", 1), AGE_COLUMN, createColumn(AGE_COLUMN, ColumnDataType.LONGLONG, false, 25, 2))); validator.validate(createMutation(row)); }
@Override public void validate(@NonNull final MysqlMutation mutation) { log.debug("Validating schema for mutation: {}", mutation); if (!hasValidSchema(mutation.getRow())) { log.warn("Invalid schema detected for mutation: {}", mutation); handler.accept(mutation); } }
MutationSchemaValidator implements Validator<MysqlMutation> { @Override public void validate(@NonNull final MysqlMutation mutation) { log.debug("Validating schema for mutation: {}", mutation); if (!hasValidSchema(mutation.getRow())) { log.warn("Invalid schema detected for mutation: {}", mutation); handler.accept(mutation); } } }
MutationSchemaValidator implements Validator<MysqlMutation> { @Override public void validate(@NonNull final MysqlMutation mutation) { log.debug("Validating schema for mutation: {}", mutation); if (!hasValidSchema(mutation.getRow())) { log.warn("Invalid schema detected for mutation: {}", mutation); handler.accept(mutation); } }  }
MutationSchemaValidator implements Validator<MysqlMutation> { @Override public void validate(@NonNull final MysqlMutation mutation) { log.debug("Validating schema for mutation: {}", mutation); if (!hasValidSchema(mutation.getRow())) { log.warn("Invalid schema detected for mutation: {}", mutation); handler.accept(mutation); } }  @Override void validate(@NonNull final MysqlMutation mutation); @Override void reset(); }
MutationSchemaValidator implements Validator<MysqlMutation> { @Override public void validate(@NonNull final MysqlMutation mutation) { log.debug("Validating schema for mutation: {}", mutation); if (!hasValidSchema(mutation.getRow())) { log.warn("Invalid schema detected for mutation: {}", mutation); handler.accept(mutation); } }  @Override void validate(@NonNull final MysqlMutation mutation); @Override void reset();  }