@Test public void testFormSelectWithoutTableName() { final String fullQuery = "SELECT name FROM people"; a(dialect.formSelect(null, new String[]{"name"}, fullQuery, new ArrayList<String>(), -1, -1)).shouldBeEqual(fullQuery); }
@Override public String formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset) { StringBuilder fullQuery = new StringBuilder(); appendSelect(fullQuery, tableName, columns, null, subQuery, orderBys); if(limit != -1){ fullQuery.append(" LIMIT ").append(limit); } if(offset != -1){ fullQuery.append(" OFFSET ").append(offset); } return fullQuery.toString(); }
PostgreSQLDialect extends DefaultDialect { @Override public String formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset) { StringBuilder fullQuery = new StringBuilder(); appendSelect(fullQuery, tableName, columns, null, subQuery, orderBys); if(limit != -1){ fullQuery.append(" LIMIT ").append(limit); } if(offset != -1){ fullQuery.append(" OFFSET ").append(offset); } return fullQuery.toString(); } }
PostgreSQLDialect extends DefaultDialect { @Override public String formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset) { StringBuilder fullQuery = new StringBuilder(); appendSelect(fullQuery, tableName, columns, null, subQuery, orderBys); if(limit != -1){ fullQuery.append(" LIMIT ").append(limit); } if(offset != -1){ fullQuery.append(" OFFSET ").append(offset); } return fullQuery.toString(); }  }
PostgreSQLDialect extends DefaultDialect { @Override public String formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset) { StringBuilder fullQuery = new StringBuilder(); appendSelect(fullQuery, tableName, columns, null, subQuery, orderBys); if(limit != -1){ fullQuery.append(" LIMIT ").append(limit); } if(offset != -1){ fullQuery.append(" OFFSET ").append(offset); } return fullQuery.toString(); }  @Override String formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset); }
PostgreSQLDialect extends DefaultDialect { @Override public String formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset) { StringBuilder fullQuery = new StringBuilder(); appendSelect(fullQuery, tableName, columns, null, subQuery, orderBys); if(limit != -1){ fullQuery.append(" LIMIT ").append(limit); } if(offset != -1){ fullQuery.append(" OFFSET ").append(offset); } return fullQuery.toString(); }  @Override String formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset);  }