public class loadCSV
extends java.lang.Object
has an Connection type object from QueryDatabase,
using it to transfer information from .csv file to database, the database 's name
has smme ralation to csv file.
for example, .csv name is "data.csv", then database's name is "data.csv.sqlite".
QueryDatabase
构造器和说明 |
---|
loadCSV(java.lang.String path,
java.sql.Connection con)
a constructor using connection con to connect the .csv and .sqlite
has an Connection type object from QueryDatabase.
|
限定符和类型 | 方法和说明 |
---|---|
private void |
insertData()
for transfer data from csv file to sqlite file
|
private boolean |
isExistT(java.lang.String tableName)
judege a table is exist in the database
|
loadCSV(java.lang.String path, java.sql.Connection con)
has an Connection type object from QueryDatabase.
path
- is the adress of the resource filecon
- a Connection is frome the QueryDatabase.private boolean isExistT(java.lang.String tableName) throws java.sql.SQLException
tableName,
- a String referring to the table's name in the database.java.sql.SQLException
- if an exception take placeprivate void insertData()