use of org.thingsboard.server.dao.nosql.CassandraStatementTask in project thingsboard by thingsboard.
the class AbstractBufferedRateExecutor method queryToString.
private String queryToString(AsyncTaskContext<T, V> taskCtx) {
CassandraStatementTask cassStmtTask = (CassandraStatementTask) taskCtx.getTask();
if (cassStmtTask.getStatement() instanceof BoundStatement) {
BoundStatement stmt = (BoundStatement) cassStmtTask.getStatement();
String query = stmt.getPreparedStatement().getQuery();
try {
query = toStringWithValues(stmt, ProtocolVersion.V5);
} catch (Exception e) {
log.warn("Can't convert to query with values", e);
}
return query;
} else {
return "Not Cassandra Statement Task";
}
}
Aggregations