@Test public void testPagingQuery() throws Exception { String sql1 = db.getSelectStatement("database.tablename", "some(set),of(columns),that,might,contain,methods,a.*","","contain",100L,0L); String expected1 = "SELECT some(set),of(columns),that,might,contain,methods,a.* FROM database.tablename ORDER BY contain OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY"; Assert.assertEquals(sql1,expected1); String sql2 = db.getSelectStatement("database.tablename", "some(set),of(columns),that,might,contain,methods,a.*","","contain",10000L,123456L); String expected2 = "SELECT some(set),of(columns),that,might,contain,methods,a.* FROM database.tablename ORDER BY contain OFFSET 123456 ROWS FETCH NEXT 10000 ROWS ONLY"; Assert.assertEquals(sql2,expected2); String sql3 = db.getSelectStatement("database.tablename", "some(set),of(columns),that,might,contain,methods,a.*","methods='strange'","contain",10000L,123456L); String expected3 = "SELECT some(set),of(columns),that,might,contain,methods,a.* FROM database.tablename WHERE methods='strange' ORDER BY contain OFFSET 123456 ROWS FETCH NEXT 10000 ROWS ONLY"; Assert.assertEquals(sql3,expected3); }
@Override public String getSelectStatement(String tableName, String columnNames, String whereClause, String orderByClause, Long limit, Long offset) { return getSelectStatement(tableName, columnNames, whereClause, orderByClause, limit, offset, null); }
MSSQLDatabaseAdapter implements DatabaseAdapter { @Override public String getSelectStatement(String tableName, String columnNames, String whereClause, String orderByClause, Long limit, Long offset) { return getSelectStatement(tableName, columnNames, whereClause, orderByClause, limit, offset, null); } }
MSSQLDatabaseAdapter implements DatabaseAdapter { @Override public String getSelectStatement(String tableName, String columnNames, String whereClause, String orderByClause, Long limit, Long offset) { return getSelectStatement(tableName, columnNames, whereClause, orderByClause, limit, offset, null); }  }
MSSQLDatabaseAdapter implements DatabaseAdapter { @Override public String getSelectStatement(String tableName, String columnNames, String whereClause, String orderByClause, Long limit, Long offset) { return getSelectStatement(tableName, columnNames, whereClause, orderByClause, limit, offset, null); }  @Override String getName(); @Override String getDescription(); @Override String getSelectStatement(String tableName, String columnNames, String whereClause, String orderByClause, Long limit, Long offset); @Override String getSelectStatement(String tableName, String columnNames, String whereClause, String orderByClause, Long limit, Long offset, String columnForPartitioning); @Override String unwrapIdentifier(String identifier); }
MSSQLDatabaseAdapter implements DatabaseAdapter { @Override public String getSelectStatement(String tableName, String columnNames, String whereClause, String orderByClause, Long limit, Long offset) { return getSelectStatement(tableName, columnNames, whereClause, orderByClause, limit, offset, null); }  @Override String getName(); @Override String getDescription(); @Override String getSelectStatement(String tableName, String columnNames, String whereClause, String orderByClause, Long limit, Long offset); @Override String getSelectStatement(String tableName, String columnNames, String whereClause, String orderByClause, Long limit, Long offset, String columnForPartitioning); @Override String unwrapIdentifier(String identifier);  }