Search in sources :

Example 1 with ColumnOperationContext

use of com.datastax.oss.dsbulk.generated.cql3.CqlParser.ColumnOperationContext in project dsbulk by datastax.

the class QueryInspector method visitUpdateStatement.

// UPDATE
@Override
public CQLFragment visitUpdateStatement(UpdateStatementContext ctx) {
    visitColumnFamilyName(ctx.columnFamilyName());
    for (ColumnOperationContext op : ctx.columnOperation()) {
        CQLWord column = visitCident(op.cident());
        CQLFragment variable = visitColumnOperationDifferentiator(op.columnOperationDifferentiator());
        if (variable != null) {
            assignmentsBuilder.put(column, variable == QUESTION_MARK ? column : variable);
        }
    }
    visitWhereClause(ctx.whereClause());
    if (ctx.usingClause() != null) {
        visitUsingClause(ctx.usingClause());
    }
    return null;
}
Also used : ColumnOperationContext(com.datastax.oss.dsbulk.generated.cql3.CqlParser.ColumnOperationContext) CQLWord(com.datastax.oss.dsbulk.mapping.CQLWord) CQLFragment(com.datastax.oss.dsbulk.mapping.CQLFragment)

Aggregations

ColumnOperationContext (com.datastax.oss.dsbulk.generated.cql3.CqlParser.ColumnOperationContext)1 CQLFragment (com.datastax.oss.dsbulk.mapping.CQLFragment)1 CQLWord (com.datastax.oss.dsbulk.mapping.CQLWord)1