public long getIntervalMin() { return this.getRawQuery().getIntervalmin(); } }
@Override public CompiledQuery compile(RawQuery query) throws QueryCompileException { return new CompiledQuery(query); } }
public Builder verbose(Boolean verbose) { if (verbose == null) { verbose = true; } this.rawQuery.setVerbose(verbose); return this; } }
@Test public void testCreatedCompiledQuery() throws QueryCompileException, IOException { RawQuery rawQuery = new RawQuery(); rawQuery.setQuery(queryStr); rawQuery.setStartTime(startTime); rawQuery.setEndTime(endTime); rawQuery.setPageSize(pageSize); CompiledQuery query = new CompiledQuery(rawQuery); Assert.assertEquals(baseTimestamp, query.getStartTime()); Assert.assertEquals(baseTimestamp + 2000, query.getEndTime()); Assert.assertEquals(rawQuery.isTreeAgg(), query.isHasAgg()); Assert.assertEquals(rawQuery.isTimeSeries(), query.isTimeSeries()); RawQuery raw2 = RawQuery.build().query(queryStr).startTime(startTime) .endTime(endTime).pageSize(pageSize).done(); Assert.assertEquals(rawQuery.toString(), raw2.toString()); } }
public void testSimpleQueryBuilder2() throws QueryCompileException { RawQuery rawQuery = new RawQuery(); rawQuery.setQuery("TestTimeSeriesAPIEntity[@cluster=\"thecluster\" AND @field4 > 1000 OR @field5 < 10000 ]{@field1,@field2, EXP{@field3/2}}"); rawQuery.setStartTime("2015-01-06 01:40:02"); rawQuery.setEndTime("2015-01-06 01:40:02"); rawQuery.setPageSize(1000); CompiledQuery query = new CompiledQuery(rawQuery); QueryCriteriaBuilder criteriaBuilder = new QueryCriteriaBuilder(query,jdbcEntityDefinition); Criteria criteria = criteriaBuilder.build(); LOG.info(criteria.toString()); }
public Builder endTime(String endTime) { this.rawQuery.setEndTime(endTime); return this; }
public Builder startTime(String startTime) { this.rawQuery.setStartTime(startTime); return this; }
public Builder query(String query) { this.rawQuery.setQuery(query); return this; }
public Builder pageSize(int pageSize) { this.rawQuery.setPageSize(pageSize); return this; }
public Builder() { this.rawQuery = new RawQuery(); }
public GenericServiceAPIResponseEntity updateEntities(List<? extends TaggedLogAPIEntity> entities, String serviceName) { CreateStatement createStatement = new CreateStatement(entities, serviceName); GenericServiceAPIResponseEntity<String> response = updateDatabase(createStatement); return response; }
public Builder timeSeries(boolean timeSeries) { this.rawQuery.setTimeSeries(timeSeries); return this; }
public Builder intervalMin(long intervalmin) { this.rawQuery.setIntervalmin(intervalmin); return this; }
public Builder filerIfMissing(boolean filterIfMissing) { this.rawQuery.setFilterIfMissing(filterIfMissing); return this; }
public Builder metricName(String metricName) { this.rawQuery.setMetricName(metricName); return this; }
public Builder parallel(int parallel) { this.rawQuery.setParallel(parallel); return this; }
public Builder top(int top) { this.rawQuery.setTop(top); return this; }
public Builder startRowkey(String startRowkey) { this.rawQuery.setStartRowkey(startRowkey); return this; }
public Builder treeAgg(boolean treeAgg) { this.rawQuery.setTreeAgg(treeAgg); return this; }
public static Builder build() { return new Builder(); }