|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.util.JdbcUtils
public class JdbcUtils
This is a utility class with JDBC helper functions.
Method Summary | |
---|---|
static void |
closeSilently(java.sql.Connection conn)
Close a connection without throwing an exception. |
static void |
closeSilently(java.sql.ResultSet rs)
Close a result set without throwing an exception. |
static void |
closeSilently(java.sql.Statement stat)
Close a statement without throwing an exception. |
static void |
closeSilently(javax.sql.XAConnection conn)
Close an XA connection set without throwing an exception. |
static java.lang.String |
escapeMetaDataPattern(java.lang.String pattern)
Escape table or schema patterns used for DatabaseMetaData functions. |
static java.sql.Connection |
getConnection(java.lang.String driver,
java.lang.String url,
java.util.Properties prop)
Open a new database connection with the given settings. |
static java.sql.Connection |
getConnection(java.lang.String driver,
java.lang.String url,
java.lang.String user,
java.lang.String password)
Open a new database connection with the given settings. |
static java.sql.ResultSet |
getGeneratedKeys(java.sql.Statement stat)
Get the result set containing the generated keys from the given statement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void closeSilently(java.sql.Statement stat)
stat
- the statement or nullpublic static void closeSilently(java.sql.Connection conn)
conn
- the connection or nullpublic static void closeSilently(java.sql.ResultSet rs)
rs
- the result set or nullpublic static java.sql.ResultSet getGeneratedKeys(java.sql.Statement stat) throws java.sql.SQLException
stat
- the statement
java.sql.SQLException
public static void closeSilently(javax.sql.XAConnection conn)
conn
- the XA connection or nullpublic static java.sql.Connection getConnection(java.lang.String driver, java.lang.String url, java.lang.String user, java.lang.String password) throws java.sql.SQLException
driver
- the driver class nameurl
- the database URLuser
- the user namepassword
- the password
java.sql.SQLException
public static java.lang.String escapeMetaDataPattern(java.lang.String pattern)
pattern
- the pattern
public static java.sql.Connection getConnection(java.lang.String driver, java.lang.String url, java.util.Properties prop) throws java.sql.SQLException
driver
- the driver class nameurl
- the database URLprop
- the properties containing at least the user name and password
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |