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