org.influxdb.querybuilder.Ordering Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of influxdb-java Show documentation
Show all versions of influxdb-java Show documentation
Java API to access the InfluxDB REST API
The newest version!
package org.influxdb.querybuilder;
public class Ordering implements Appendable {
private final boolean isDesc;
private static final String TIME_KEY = "time";
/**
* Influxdb ordering currently supports only time.
*
* @param isDesc
*/
Ordering(final boolean isDesc) {
this.isDesc = isDesc;
}
@Override
public void appendTo(final StringBuilder stringBuilder) {
Appender.appendName(TIME_KEY, stringBuilder);
if (isDesc) {
stringBuilder.append(" DESC");
} else {
stringBuilder.append(" ASC");
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy