public class DatabaseUtil extends Object
Constructor and Description |
---|
DatabaseUtil() |
Modifier and Type | Method and Description |
---|---|
static List<List<Object>> |
executeSQL(Connection conn,
String sql,
boolean selectOnly)
Executes the passed SQL query, enforcing select only if that parameter is set
|
static void |
loadDatabaseDriver(String connectionUrl)
Load the jdbc driver clas for the database which is specified by the connectionUrl parameter
This is only needed when loading up a jdbc connection manually for the first time. |
public static void loadDatabaseDriver(String connectionUrl) throws ClassNotFoundException
connectionUrl
- the connection url for the database, such as
"jdbc:mysql://localhost:3306/..."ClassNotFoundException
public static List<List<Object>> executeSQL(Connection conn, String sql, boolean selectOnly) throws DAOException
DAOException
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.