Interface RangeScanOption


public interface RangeScanOption
RangeScanOption is a sealed interface that represents options for controlling range scan operations. It allows specifying additional preferences such as the partition key or secondary index name.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    IncludeValue(boolean includeValue)
    IncludeValue includes or excludes the values of the records.
    PartitionKey(String partitionKey)
    PartitionKey overrides the partition routing with the specified `partitionKey` instead of the regular record key.
    UseIndex(String secondaryIndexName)
    UseIndex let the users specify a different index to follow for the range scan operation
  • Method Details

    • PartitionKey

      static RangeScanOption PartitionKey(String partitionKey)
      PartitionKey overrides the partition routing with the specified `partitionKey` instead of the regular record key.

      Records with the same partitionKey will always be guaranteed to be co-located in the same Oxia shard.

      Parameters:
      partitionKey - the partition key to use
      Returns:
      the RangeScanOption.
    • UseIndex

      static RangeScanOption UseIndex(String secondaryIndexName)
      UseIndex let the users specify a different index to follow for the range scan operation
      Parameters:
      secondaryIndexName - the name of the secondary index to use
      Returns:
      the RangeScanOption.
    • IncludeValue

      static RangeScanOption IncludeValue(boolean includeValue)
      IncludeValue includes or excludes the values of the records. Without the values, the range scan returns the key and the version of each record, and the value of each result is empty. Older servers still send the values, and the client drops them.
      Parameters:
      includeValue - whether to include the values. By default, they are included.
      Returns:
      the RangeScanOption.