Package org.apache.cassandra.cql3
Class UpdateParameters
java.lang.Object
org.apache.cassandra.cql3.UpdateParameters
Groups the parameters of an update query, and make building updates easier.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ClientStatefinal TableMetadatafinal QueryOptionsfinal RegularAndStaticColumns -
Constructor Summary
ConstructorsConstructorDescriptionUpdateParameters(TableMetadata metadata, RegularAndStaticColumns updatedColumns, ClientState clientState, QueryOptions options, long timestamp, long nowInSec, int ttl, Map<DecoratedKey, Partition> prefetchedRows) -
Method Summary
Modifier and TypeMethodDescriptionCell<?>addCell(ColumnMetadata column, ByteBuffer value) Cell<?>addCell(ColumnMetadata column, CellPath path, ByteBuffer value) voidaddCounter(ColumnMetadata column, long increment) voidvoidvoidaddTombstone(ColumnMetadata column) voidaddTombstone(ColumnMetadata column, CellPath path) buildRow()Clustering<?>getPrefetchedRow(DecoratedKey key, Clustering<?> clustering) Returns the prefetched row with the already performed modifications.makeRangeTombstone(ClusteringComparator comparator, Clustering<?> clustering) makeRangeTombstone(Slice slice) <V> voidnewRow(Clustering<V> clustering) byte[]voidsetComplexDeletionTime(ColumnMetadata column) void
-
Field Details
-
metadata
-
updatedColumns
-
clientState
-
options
-
-
Constructor Details
-
UpdateParameters
public UpdateParameters(TableMetadata metadata, RegularAndStaticColumns updatedColumns, ClientState clientState, QueryOptions options, long timestamp, long nowInSec, int ttl, Map<DecoratedKey, Partition> prefetchedRows) throws InvalidRequestException- Throws:
InvalidRequestException
-
-
Method Details
-
newRow
- Throws:
InvalidRequestException
-
currentClustering
-
addPrimaryKeyLivenessInfo
public void addPrimaryKeyLivenessInfo() -
addRowDeletion
public void addRowDeletion() -
addTombstone
- Throws:
InvalidRequestException
-
addTombstone
- Throws:
InvalidRequestException
-
addCell
- Throws:
InvalidRequestException
-
addCell
public Cell<?> addCell(ColumnMetadata column, CellPath path, ByteBuffer value) throws InvalidRequestException - Throws:
InvalidRequestException
-
addCounter
- Throws:
InvalidRequestException
-
setComplexDeletionTime
-
setComplexDeletionTimeForOverwrite
-
buildRow
-
deletionTime
-
makeRangeTombstone
-
makeRangeTombstone
-
nextTimeUUIDAsBytes
public byte[] nextTimeUUIDAsBytes() -
getPrefetchedRow
Returns the prefetched row with the already performed modifications.If no modification have yet been performed this method will return the fetched row or
nullif the row does not exist. If some modifications (updates or deletions) have already been done the row returned will be the result of the merge of the fetched row and of the pending mutations.- Parameters:
key- the partition keyclustering- the row clustering- Returns:
- the prefetched row with the already performed modifications
-