Class CollectionFindOptions

java.lang.Object
com.datastax.astra.client.core.options.BaseOptions<CollectionFindOptions>
com.datastax.astra.client.collections.commands.options.CollectionFindOptions
All Implemented Interfaces:
Cloneable

public class CollectionFindOptions extends BaseOptions<CollectionFindOptions>
List Options for a FindOne command.
  • Constructor Details

    • CollectionFindOptions

      public CollectionFindOptions()
      Default constructor.
  • Method Details

    • getSortArray

      public Sort[] getSortArray()
      Get the sort options.
      Returns:
      sort options
    • sort

      public CollectionFindOptions sort(Sort... s)
      Adding this on top of sort(Sort[] s) to allow for a more fluent API.
      Parameters:
      s - sort options
      Returns:
      current command
    • getProjectionArray

      public Projection[] getProjectionArray()
      Adding this on top of sort(Sort[] s) to allow for a more fluent API.
      Returns:
      project
    • projection

      public CollectionFindOptions projection(Projection... p)
      Adding this on top of projection(Projection[] p) to allow for a more fluent API.
      Parameters:
      p - projection options
      Returns:
      current command
    • skip

      public CollectionFindOptions skip(int skip)
      Add a skip clause in the find block
      Parameters:
      skip - value for skip options
      Returns:
      current command
    • limit

      public CollectionFindOptions limit(int limit)
      Add a limit clause in the find block
      Parameters:
      limit - value for limit options
      Returns:
      current command