private UpdateParameters makeUpdateParameters(Collection<ByteBuffer> keys, NavigableSet<Clustering> clusterings, QueryOptions options, boolean local, long now, long queryStartNanoTime) { if (clusterings.contains(Clustering.STATIC_CLUSTERING)) return makeUpdateParameters(keys, new ClusteringIndexSliceFilter(Slices.ALL, false), options, DataLimits.cqlLimits(1), local, now, queryStartNanoTime); return makeUpdateParameters(keys, new ClusteringIndexNamesFilter(clusterings, false), options, DataLimits.NONE, local, now, queryStartNanoTime); }
private UpdateParameters makeUpdateParameters(Collection<ByteBuffer> keys, NavigableSet<Clustering> clusterings, QueryOptions options, boolean local, long now, long queryStartNanoTime) { if (clusterings.contains(Clustering.STATIC_CLUSTERING)) return makeUpdateParameters(keys, new ClusteringIndexSliceFilter(Slices.ALL, false), options, DataLimits.cqlLimits(1), local, now, queryStartNanoTime); return makeUpdateParameters(keys, new ClusteringIndexNamesFilter(clusterings, false), options, DataLimits.NONE, local, now, queryStartNanoTime); }
private UpdateParameters makeUpdateParameters(Collection<ByteBuffer> keys, NavigableSet<Clustering> clusterings, QueryOptions options, boolean local, long now, long queryStartNanoTime) { if (clusterings.contains(Clustering.STATIC_CLUSTERING)) return makeUpdateParameters(keys, new ClusteringIndexSliceFilter(Slices.ALL, false), options, DataLimits.cqlLimits(1), local, now, queryStartNanoTime); return makeUpdateParameters(keys, new ClusteringIndexNamesFilter(clusterings, false), options, DataLimits.NONE, local, now, queryStartNanoTime); }
/** * Convert statement into a list of mutations to apply on the server * * @param options value for prepared statement markers * @param local if true, any requests (for collections) performed by getMutation should be done locally only. * @param now the current timestamp in microseconds to use if no timestamp is user provided. * * @return list of the mutations * @throws InvalidRequestException on invalid requests */ private Collection<? extends IMutation> getMutations(QueryOptions options, boolean local, long now) throws RequestExecutionException, RequestValidationException { List<ByteBuffer> keys = buildPartitionKeyNames(options); Composite clusteringPrefix = createClusteringPrefix(options); UpdateParameters params = makeUpdateParameters(keys, clusteringPrefix, options, local, now); Collection<IMutation> mutations = new ArrayList<IMutation>(keys.size()); for (ByteBuffer key: keys) { ThriftValidation.validateKey(cfm, key); ColumnFamily cf = ArrayBackedSortedColumns.factory.create(cfm); addUpdateForKey(cf, key, clusteringPrefix, params); Mutation mut = new Mutation(cfm.ksName, key, cf); mutations.add(isCounter() ? new CounterMutation(mut, options.getConsistency()) : mut); } return mutations; }
UpdateParameters params = statement.makeUpdateParameters(keys, clusteringPrefix, options, local, now);
return; UpdateParameters params = makeUpdateParameters(keys, new ClusteringIndexSliceFilter(slices, false), options, return; UpdateParameters params = makeUpdateParameters(keys, clusterings, options, local, now, queryStartNanoTime);
return; UpdateParameters params = makeUpdateParameters(keys, new ClusteringIndexSliceFilter(slices, false), options, return; UpdateParameters params = makeUpdateParameters(keys, clusterings, options, local, now, queryStartNanoTime);
return; UpdateParameters params = makeUpdateParameters(keys, new ClusteringIndexSliceFilter(slices, false), options, return; UpdateParameters params = makeUpdateParameters(keys, clusterings, options, local, now, queryStartNanoTime);