Polypheny-DB
Polypheny-DB copied to clipboard
Added testConnection feature in CSV adapter. Issue #450
fixes #450
Summary
I added a method called testConnection in the DataSource abstarct in order to test the connection of a specific Data Source. The method could be abstract so that every class has to provide it implementation but for now it is not a priority.The CSV adaptor was not checking whether the uploaded file is a valid CSV file or not ,so I added this in the testConnection method.I tested and the CSV adaptor will not add invalid CSV files.This has to be done also for all the classes that extends the DataSource abstract class.I need somebody to guide how to do so in the other DataSources: Ethereum,GoogleSheet
Changes
-
testConnection method in all concrete classes that extends AbstractJdbcSource checks if the connection is valid by creating a connection handler and doing a trivial query "Select 1"
-
testConnection method in CsvSource class checks if the the csv source provided has the valid file extension
-
testConnection method in ExcelSource class checks if the the excel source provided has the valid file extension
-
testConnection method in Qfs class checks if the the root file source provided exists
ToDo
- [x] Add testConnection to CSV
- [x] Add testConnection to Excel
- [ ] Add testConnection to GoogleSheet
- [x] Add testConnection to Qfs
- [x] Add testConnection to AbstractJdbcSource
- [ ] Add testConnection to Ethereum