Class InfluxQLQuery

java.lang.Object
com.influxdb.client.domain.InfluxQLQuery

public class InfluxQLQuery extends Object
A InfluxQL query.
  • Constructor Details

    • InfluxQLQuery

      public InfluxQLQuery(@Nonnull String command, @Nonnull String database)
      Parameters:
      command - the InfluxQL command to execute
      database - the database to run this query against
    • InfluxQLQuery

      public InfluxQLQuery(@Nonnull String command, @Nonnull String database, @Nonnull InfluxQLQuery.AcceptHeader acceptHeader)
      Parameters:
      command - the InfluxQL command to execute
      database - the database to run this query against
      acceptHeader - the Accept header to use in the request
  • Method Details

    • getCommand

      @Nonnull public String getCommand()
      Returns:
      the InfluxQL command to execute
    • getDatabase

      @Nonnull public String getDatabase()
      Returns:
      the database to run this query against
    • getRetentionPolicy

      @Nullable public String getRetentionPolicy()
      Returns:
      the retention policy to use
    • setRetentionPolicy

      @Nonnull public InfluxQLQuery setRetentionPolicy(@Nullable String retentionPolicy)
      Parameters:
      retentionPolicy - the retention policy to use
      Returns:
      this
    • getPrecision

      @Nullable public InfluxQLQuery.InfluxQLPrecision getPrecision()
      Returns:
      The precision used for the timestamps returned by the query
    • setPrecision

      @Nonnull public InfluxQLQuery setPrecision(@Nullable InfluxQLQuery.InfluxQLPrecision precision)
      Parameters:
      precision - The precision used for the timestamps returned by the query
      Returns:
      this
    • getAcceptHeader

      public InfluxQLQuery.AcceptHeader getAcceptHeader()
      Returns:
      the current AcceptHeader used when making queries.
    • setAcceptHeader

      public InfluxQLQuery setAcceptHeader(InfluxQLQuery.AcceptHeader acceptHeader)
      Parameters:
      acceptHeader - the AcceptHeader to be used when making queries.
      Returns:
      this
    • getAcceptHeaderVal

      public String getAcceptHeaderVal()
      Returns:
      the string value of the AcceptHeader used when making queries.