[3.3.3] Add feature to save json to custom Cassandra table

This commit is contained in:
Nikitozin 2022-01-14 12:00:45 +02:00
parent adddf5d180
commit d66fb8f528

View File

@ -195,8 +195,10 @@ public class TbSaveToCustomCassandraTableNode implements TbNode {
} else {
stmtBuilder.setToNull(i.get());
}
} else if (dataKeyElement.isJsonObject()) {
stmtBuilder.setString(i.get(), dataKeyElement.getAsJsonObject().toString());
} else {
throw new IllegalStateException("Message data key: '" + key + "' with value: '" + value + "' is not a JSON Primitive!");
throw new IllegalStateException("Message data key: '" + key + "' with value: '" + value + "' is not a JSON");
}
} else {
throw new RuntimeException("Message data doesn't contain key: " + "'" + key + "'!");