Class MySQLDatabaseService
- java.lang.Object
-
- org.openrefine.extension.database.DatabaseService
-
- org.openrefine.extension.database.mysql.MySQLDatabaseService
-
public class MySQLDatabaseService extends DatabaseService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openrefine.extension.database.DatabaseService
DatabaseService.DBType
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DatabaseInfo
connect(DatabaseConfiguration dbConfig)
DatabaseInfo
executeQuery(DatabaseConfiguration dbConfig, String query)
ArrayList<DatabaseColumn>
getColumns(DatabaseConfiguration dbConfig, String query)
Connection
getConnection(DatabaseConfiguration dbConfig)
protected String
getDatabaseUrl(DatabaseConfiguration dbConfig)
static MySQLDatabaseService
getInstance()
List<DatabaseRow>
getRows(DatabaseConfiguration dbConfig, String query)
boolean
testConnection(DatabaseConfiguration dbConfig)
DatabaseInfo
testQuery(DatabaseConfiguration dbConfig, String query)
-
Methods inherited from class org.openrefine.extension.database.DatabaseService
buildLimitQuery, get
-
-
-
-
Field Detail
-
DB_NAME
public static final String DB_NAME
- See Also:
- Constant Field Values
-
DB_DRIVER
public static final String DB_DRIVER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static MySQLDatabaseService getInstance()
-
testConnection
public boolean testConnection(DatabaseConfiguration dbConfig) throws DatabaseServiceException
- Specified by:
testConnection
in classDatabaseService
- Throws:
DatabaseServiceException
-
connect
public DatabaseInfo connect(DatabaseConfiguration dbConfig) throws DatabaseServiceException
- Specified by:
connect
in classDatabaseService
- Throws:
DatabaseServiceException
-
executeQuery
public DatabaseInfo executeQuery(DatabaseConfiguration dbConfig, String query) throws DatabaseServiceException
- Specified by:
executeQuery
in classDatabaseService
- Throws:
DatabaseServiceException
-
getColumns
public ArrayList<DatabaseColumn> getColumns(DatabaseConfiguration dbConfig, String query) throws DatabaseServiceException
- Specified by:
getColumns
in classDatabaseService
- Throws:
DatabaseServiceException
-
getRows
public List<DatabaseRow> getRows(DatabaseConfiguration dbConfig, String query) throws DatabaseServiceException
- Specified by:
getRows
in classDatabaseService
- Throws:
DatabaseServiceException
-
getDatabaseUrl
protected String getDatabaseUrl(DatabaseConfiguration dbConfig)
- Overrides:
getDatabaseUrl
in classDatabaseService
-
getConnection
public Connection getConnection(DatabaseConfiguration dbConfig) throws DatabaseServiceException
- Specified by:
getConnection
in classDatabaseService
- Throws:
DatabaseServiceException
-
testQuery
public DatabaseInfo testQuery(DatabaseConfiguration dbConfig, String query) throws DatabaseServiceException
- Specified by:
testQuery
in classDatabaseService
- Throws:
DatabaseServiceException
-
-