@Test public void testRemoveLimitAndOffset() { StatementBuilder statementBuilder = new StatementBuilder(); Statement initialOffset = statementBuilder.where("id = 1").limit(100).offset(100).toStatement(); assertEquals("WHERE id = 1 LIMIT 100 OFFSET 100", initialOffset.getQuery()); Statement removed = statementBuilder.removeLimitAndOffset().toStatement(); assertEquals("WHERE id = 1", removed.getQuery()); }
public StatementBuilder removeLimitAndOffset() { queryBuilder.removeLimitAndOffset(); return this; }
StatementBuilder { public StatementBuilder removeLimitAndOffset() { queryBuilder.removeLimitAndOffset(); return this; } }
StatementBuilder { public StatementBuilder removeLimitAndOffset() { queryBuilder.removeLimitAndOffset(); return this; } StatementBuilder(); @VisibleForTesting  StatementBuilder(QueryBuilderInterface<Value> queryBuilder); }
StatementBuilder { public StatementBuilder removeLimitAndOffset() { queryBuilder.removeLimitAndOffset(); return this; } StatementBuilder(); @VisibleForTesting  StatementBuilder(QueryBuilderInterface<Value> queryBuilder); StatementBuilder withBindVariableValue(String key, Object value); StatementBuilder withBindVariableValue(String key, Value value); Statement toStatement(); StatementBuilder select(String columns); StatementBuilder from(String table); StatementBuilder where(String conditions); StatementBuilder limit(Integer count); StatementBuilder offset(Integer count); StatementBuilder increaseOffsetBy(Integer amount); Integer getOffset(); StatementBuilder removeLimitAndOffset(); StatementBuilder orderBy(String orderBy); Map<String, Value> getBindVariableMap(); String buildQuery(); }
StatementBuilder { public StatementBuilder removeLimitAndOffset() { queryBuilder.removeLimitAndOffset(); return this; } StatementBuilder(); @VisibleForTesting  StatementBuilder(QueryBuilderInterface<Value> queryBuilder); StatementBuilder withBindVariableValue(String key, Object value); StatementBuilder withBindVariableValue(String key, Value value); Statement toStatement(); StatementBuilder select(String columns); StatementBuilder from(String table); StatementBuilder where(String conditions); StatementBuilder limit(Integer count); StatementBuilder offset(Integer count); StatementBuilder increaseOffsetBy(Integer amount); Integer getOffset(); StatementBuilder removeLimitAndOffset(); StatementBuilder orderBy(String orderBy); Map<String, Value> getBindVariableMap(); String buildQuery(); static final int SUGGESTED_PAGE_LIMIT; }