/** * Adds the conditions to the specified CAS request. * * @param request the request * @param clustering the clustering prefix * @param options the query options */ public void addConditionsTo(CQL3CasRequest request, Clustering clustering, QueryOptions options) { if (!columnConditions.isEmpty()) request.addConditions(clustering, columnConditions, options); if (!staticConditions.isEmpty()) request.addConditions(Clustering.STATIC_CLUSTERING, staticConditions, options); }
/** * Adds the conditions to the specified CAS request. * * @param request the request * @param clustering the clustering prefix * @param options the query options */ public void addConditionsTo(CQL3CasRequest request, Clustering clustering, QueryOptions options) { if (!columnConditions.isEmpty()) request.addConditions(clustering, columnConditions, options); if (!staticConditions.isEmpty()) request.addConditions(Clustering.STATIC_CLUSTERING, staticConditions, options); }
/** * Adds the conditions to the specified CAS request. * * @param request the request * @param clustering the clustering prefix * @param options the query options */ public void addConditionsTo(CQL3CasRequest request, Clustering clustering, QueryOptions options) { if (!columnConditions.isEmpty()) request.addConditions(clustering, columnConditions, options); if (!staticConditions.isEmpty()) request.addConditions(Clustering.STATIC_CLUSTERING, staticConditions, options); }
public void addConditions(Composite clusteringPrefix, CQL3CasRequest request, QueryOptions options) throws InvalidRequestException { if (ifNotExists) { // If we use ifNotExists, if the statement applies to any non static columns, then the condition is on the row of the non-static // columns and the prefix should be the clusteringPrefix. But if only static columns are set, then the ifNotExists apply to the existence // of any static columns and we should use the prefix for the "static part" of the partition. request.addNotExist(clusteringPrefix); } else if (ifExists) { request.addExist(clusteringPrefix); } else { if (columnConditions != null) request.addConditions(clusteringPrefix, columnConditions, options); if (staticConditions != null) request.addConditions(cfm.comparator.staticPrefix(), staticConditions, options); } }