private CQL3CasRequest makeCasRequest(QueryState queryState, QueryOptions options) { List<ByteBuffer> keys = buildPartitionKeyNames(options); // We don't support IN for CAS operation so far checkFalse(restrictions.keyIsInRelation(), "IN on the partition key is not supported with conditional %s", type.isUpdate()? "updates" : "deletions"); DecoratedKey key = cfm.decorateKey(keys.get(0)); long now = options.getTimestamp(queryState); checkFalse(restrictions.clusteringKeyRestrictionsHasIN(), "IN on the clustering key columns is not supported with conditional %s", type.isUpdate()? "updates" : "deletions"); Clustering clustering = Iterables.getOnlyElement(createClustering(options)); CQL3CasRequest request = new CQL3CasRequest(cfm, key, false, conditionColumns(), updatesRegularRows(), updatesStaticRow()); addConditions(clustering, request, options); request.addRowUpdate(clustering, this, options, now); return request; }
private CQL3CasRequest makeCasRequest(QueryState queryState, QueryOptions options) { List<ByteBuffer> keys = buildPartitionKeyNames(options); // We don't support IN for CAS operation so far checkFalse(restrictions.keyIsInRelation(), "IN on the partition key is not supported with conditional %s", type.isUpdate()? "updates" : "deletions"); DecoratedKey key = cfm.decorateKey(keys.get(0)); long now = options.getTimestamp(queryState); checkFalse(restrictions.clusteringKeyRestrictionsHasIN(), "IN on the clustering key columns is not supported with conditional %s", type.isUpdate()? "updates" : "deletions"); Clustering clustering = Iterables.getOnlyElement(createClustering(options)); CQL3CasRequest request = new CQL3CasRequest(cfm, key, false, conditionColumns(), updatesRegularRows(), updatesStaticRow()); addConditions(clustering, request, options); request.addRowUpdate(clustering, this, options, now); return request; }
private CQL3CasRequest makeCasRequest(QueryState queryState, QueryOptions options) { List<ByteBuffer> keys = buildPartitionKeyNames(options); // We don't support IN for CAS operation so far checkFalse(restrictions.keyIsInRelation(), "IN on the partition key is not supported with conditional %s", type.isUpdate()? "updates" : "deletions"); DecoratedKey key = cfm.decorateKey(keys.get(0)); long now = options.getTimestamp(queryState); checkFalse(restrictions.clusteringKeyRestrictionsHasIN(), "IN on the clustering key columns is not supported with conditional %s", type.isUpdate()? "updates" : "deletions"); Clustering clustering = Iterables.getOnlyElement(createClustering(options)); CQL3CasRequest request = new CQL3CasRequest(cfm, key, false, conditionColumns(), updatesRegularRows(), updatesStaticRow()); addConditions(clustering, request, options); request.addRowUpdate(clustering, this, options, now); return request; }
conditionBuilder.addAll(stmt.conditionColumns()); updateStatic |= stmt.updatesStaticRow();
conditionBuilder.addAll(stmt.conditionColumns()); updateStatic |= stmt.updatesStaticRow();
conditionBuilder.addAll(stmt.conditionColumns()); updateStatic |= stmt.updatesStaticRow();