Skip to content

Commit

Permalink
Fixes #98 - Limit CSVDriver to only support SELECT * FROM CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem committed Apr 24, 2024
1 parent bfc93bd commit e48224f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion csv/src/main/java/com/manorrock/guppy/csv/CSVStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ public class CSVStatement implements Statement {

@Override
public ResultSet executeQuery(String sql) throws SQLException {
return new CSVResultSet();
if (sql.equals("SELECT * FROM CSV")) {
return new CSVResultSet();
}
throw new SQLException("Only 'SELECT * FROM CSV' is supported");
}

@Override
Expand Down

0 comments on commit e48224f

Please sign in to comment.