public class DatabaseToCsv extends Object
Constructor and Description |
---|
DatabaseToCsv(String driver,
String jdbcCon,
String usr,
String psw)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Connection |
connect()
Connects to the database
|
void |
export(String dir)
Export all DB tables to CSVs
|
String |
getJdbcDriver() |
String |
getJdbcPassword() |
String |
getJdbcUrl() |
String |
getJdbcUsername() |
void |
setJdbcDriver(String jdbcDriver) |
void |
setJdbcPassword(String jdbcPassword) |
void |
setJdbcUrl(String jdbcUrl) |
void |
setJdbcUsername(String jdbcUsername) |
public Connection connect() throws SQLException
SQLException
public void export(String dir) throws SQLException, IOException
dir
- the target directorySQLException
IOException
public String getJdbcDriver()
public void setJdbcDriver(String jdbcDriver)
public String getJdbcUrl()
public void setJdbcUrl(String jdbcUrl)
public String getJdbcUsername()
public void setJdbcUsername(String jdbcUsername)
public String getJdbcPassword()
public void setJdbcPassword(String jdbcPassword)
Copyright © 2014. All rights reserved.