Class LimitFlux

All Implemented Interfaces:
Expression, HasImports

public final class LimitFlux extends AbstractParametrizedFlux
Restricts the number of rows returned in the results. See SPEC.

Options

  • n - The maximum number of records to output [int].
  • offset - The number of records to skip per table [int]. Default to 0.

Example

 Flux flux = Flux
     .from("telegraf")
     .limit(5);
 
Author:
Jakub Bednar (bednar@github) (25/06/2018 11:22)
  • Constructor Details

    • LimitFlux

      public LimitFlux(@Nonnull Flux flux)
  • Method Details

    • operatorName

      @Nonnull protected String operatorName()
      Specified by:
      operatorName in class AbstractParametrizedFlux
      Returns:
      name of function
    • withN

      @Nonnull public LimitFlux withN(int numberOfResults)
      Parameters:
      numberOfResults - The number of results
      Returns:
      this
    • withOffset

      @Nonnull public LimitFlux withOffset(int offset)
      Parameters:
      offset - The number of records to skip per table.
      Returns:
      this
    • collectImports

      public void collectImports(@Nonnull Set<String> collectedImports)
      Description copied from class: Flux
      Collects all imports of the flux.
      Overrides:
      collectImports in class Flux
      Parameters:
      collectedImports - a set to be filled by the used imports