com.github.panhongan.util.sql.SqlUtil Maven / Gradle / Ivy
package com.github.panhongan.util.sql;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
public class SqlUtil {
public static void closeConnection(Connection conn) {
if (conn != null) {
try {
conn.close();
} catch (Exception e) {
}
}
}
public static void closeStatement(Statement stmt) {
if (stmt != null) {
try {
stmt.close();
} catch (Exception e) {
}
}
}
public static void closeResultSet(ResultSet rs) {
if (rs != null) {
try {
rs.close();
} catch (Exception e) {
}
}
}
}