@Test public void testGeneration() throws Exception { String sql1 = db.getSelectStatement("database.tablename", "some(set),of(columns),that,might,contain,methods,a.*","","",null,null); String expected1 = "SELECT some(set),of(columns),that,might,contain,methods,a.* FROM database.tablename"; Assert.assertEquals(sql1,expected1); String sql2 = db.getSelectStatement("database.tablename", "some(set),of(columns),that,might,contain,methods,a.*","that=\'some\"\' value\'","",null,null); String expected2 = "SELECT some(set),of(columns),that,might,contain,methods,a.* FROM database.tablename WHERE that=\'some\"\' value\'"; Assert.assertEquals(sql2,expected2); String sql3 = db.getSelectStatement("database.tablename", "some(set),of(columns),that,might,contain,methods,a.*","that=\'some\"\' value\'","might DESC",null,null); String expected3 = "SELECT some(set),of(columns),that,might,contain,methods,a.* FROM database.tablename WHERE that=\'some\"\' value\' ORDER BY might DESC"; Assert.assertEquals(sql3,expected3); String sql4 = db.getSelectStatement("database.tablename", "","that=\'some\"\' value\'","might DESC",null,null); String expected4 = "SELECT * FROM database.tablename WHERE that=\'some\"\' value\' ORDER BY might DESC"; Assert.assertEquals(sql4,expected4); }
@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);  }